Class Index | File Index

Classes


Class HomeTexture


Defined in: SweetHome3D.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
HomeTexture(texture, xOffset, yOffset, angle, scale, fittingArea, leftToRightOriented)
Creates a home texture from an existing one with customized parameters.
Method Summary
Method Attributes Method Name and Description
 
equals(obj)
Returns true if the object in parameter is equal to this texture.
 
Returns the angle of rotation in radians applied to this texture.
 
Returns the catalog ID of this texture or null if it doesn't exist.
 
Returns the creator of this texture.
 
Returns the height of the image in centimeters.
 
Returns the content of the image used for this texture.
 
Returns the name of this texture.
 
Returns the scale applied to this texture.
 
Returns the width of the image in centimeters.
 
Returns the offset applied to the texture along X axis in percentage of its width.
 
Returns the offset applied to the texture along Y axis in percentage of its height.
 
Returns a hash code for this texture.
 
Returns true the texture should fit the area to which it's applied.
 
Returns true if the objects using this texture should take into account the orientation of the texture.
 
setFittingArea(fittingArea)
Sets whether the texture should fit the area to which it's applied.
Class Detail
HomeTexture(texture, xOffset, yOffset, angle, scale, fittingArea, leftToRightOriented)
Creates a home texture from an existing one with customized parameters.
Author: Emmanuel Puybaret.
Parameters:
{Object} texture
the texture from which data are copied
{number} xOffset
the offset applied to the texture along X axis in percentage of its width
{number} yOffset
the offset applied to the texture along Y axis in percentage of its height
{number} angle
the rotation angle applied to the texture
{number} scale
the scale applied to the texture
{boolean} fittingArea
if true the texture will fit at its best the area to which it's applied
{boolean} leftToRightOriented
orientation used on the texture when applied on objects seen from front
Method Detail
{boolean} equals(obj)
Returns true if the object in parameter is equal to this texture.
Parameters:
{Object} obj
Returns:
{boolean}

{number} getAngle()
Returns the angle of rotation in radians applied to this texture.
Returns:
{number}

{string} getCatalogId()
Returns the catalog ID of this texture or null if it doesn't exist.
Returns:
{string}

{string} getCreator()
Returns the creator of this texture.
Returns:
{string}

{number} getHeight()
Returns the height of the image in centimeters.
Returns:
{number}

{Object} getImage()
Returns the content of the image used for this texture.
Returns:
{Object}

{string} getName()
Returns the name of this texture.
Returns:
{string}

{number} getScale()
Returns the scale applied to this texture.
Returns:
{number}

{number} getWidth()
Returns the width of the image in centimeters.
Returns:
{number}

{number} getXOffset()
Returns the offset applied to the texture along X axis in percentage of its width.
Returns:
{number}

{number} getYOffset()
Returns the offset applied to the texture along Y axis in percentage of its height.
Returns:
{number}

{number} hashCode()
Returns a hash code for this texture.
Returns:
{number}

{boolean} isFittingArea()
Returns true the texture should fit the area to which it's applied.
Returns:
{boolean}

{boolean} isLeftToRightOriented()
Returns true if the objects using this texture should take into account the orientation of the texture.
Returns:
{boolean}

setFittingArea(fittingArea)
Sets whether the texture should fit the area to which it's applied.
Parameters:
{boolean} fittingArea

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 21 2024 17:43:24 GMT+0200 (CEST)