public class HomeTexture extends java.lang.Object implements TextureImage, java.io.Serializable
| Constructor and Description |
|---|
HomeTexture(TextureImage texture)
Creates a home texture from an existing one.
|
HomeTexture(TextureImage texture,
float angle)
Creates a home texture from an existing one with customized angle and offset.
|
HomeTexture(TextureImage texture,
float angle,
boolean leftToRightOriented)
Creates a home texture from an existing one with customized angle and offset.
|
HomeTexture(TextureImage texture,
float angle,
float scale,
boolean leftToRightOriented)
Creates a home texture from an existing one with customized angle and offset.
|
HomeTexture(TextureImage texture,
float xOffset,
float yOffset,
float angle,
float scale,
boolean leftToRightOriented)
Creates a home texture from an existing one with customized parameters.
|
HomeTexture(TextureImage texture,
float xOffset,
float yOffset,
float angle,
float scale,
boolean fittingArea,
boolean leftToRightOriented)
Creates a home texture from an existing one with customized parameters.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
Returns
true if the object in parameter is equal to this texture. |
float |
getAngle()
Returns the angle of rotation in radians applied to this texture.
|
java.lang.String |
getCatalogId()
Returns the catalog ID of this texture or
null if it doesn't exist. |
java.lang.String |
getCreator()
Returns the creator of this texture.
|
float |
getHeight()
Returns the height of the image in centimeters.
|
Content |
getImage()
Returns the content of the image used for this texture.
|
java.lang.String |
getName()
Returns the name of this texture.
|
float |
getScale()
Returns the scale applied to this texture.
|
float |
getWidth()
Returns the width of the image in centimeters.
|
float |
getXOffset()
Returns the offset applied to the texture along X axis in percentage of its width.
|
float |
getYOffset()
Returns the offset applied to the texture along Y axis in percentage of its height.
|
int |
hashCode()
Returns a hash code for this texture.
|
boolean |
isFittingArea()
Returns
true the texture should fit the area to which it's applied. |
boolean |
isLeftToRightOriented()
Returns
true if the objects using this texture should take into account
the orientation of the texture. |
void |
setFittingArea(boolean fittingArea)
Sets whether the texture should fit the area to which it's applied.
|
public HomeTexture(TextureImage texture)
texture - the texture from which data are copiedpublic HomeTexture(TextureImage texture, float angle)
texture - the texture from which data are copiedangle - the rotation angle applied to the texturepublic HomeTexture(TextureImage texture, float angle, boolean leftToRightOriented)
texture - the texture from which data are copiedangle - the rotation angle applied to the textureleftToRightOriented - orientation used on the texture when applied on objects seen from frontpublic HomeTexture(TextureImage texture, float angle, float scale, boolean leftToRightOriented)
texture - the texture from which data are copiedangle - the rotation angle applied to the texturescale - the scale applied to the textureleftToRightOriented - orientation used on the texture when applied on objects seen from frontpublic HomeTexture(TextureImage texture, float xOffset, float yOffset, float angle, float scale, boolean leftToRightOriented)
texture - the texture from which data are copiedxOffset - the offset applied to the texture along X axis in percentage of its widthyOffset - the offset applied to the texture along Y axis in percentage of its heightangle - the rotation angle applied to the texturescale - the scale applied to the textureleftToRightOriented - orientation used on the texture when applied on objects seen from frontpublic HomeTexture(TextureImage texture, float xOffset, float yOffset, float angle, float scale, boolean fittingArea, boolean leftToRightOriented)
texture - the texture from which data are copiedxOffset - the offset applied to the texture along X axis in percentage of its widthyOffset - the offset applied to the texture along Y axis in percentage of its heightangle - the rotation angle applied to the texturescale - the scale applied to the texturefittingArea - if true the texture will fit at its best the area to which it's appliedleftToRightOriented - orientation used on the texture when applied on objects seen from frontpublic java.lang.String getCatalogId()
null if it doesn't exist.public java.lang.String getName()
getName in interface TextureImagepublic java.lang.String getCreator()
getCreator in interface TextureImagepublic Content getImage()
getImage in interface TextureImagepublic float getWidth()
getWidth in interface TextureImagepublic float getHeight()
getHeight in interface TextureImagepublic float getXOffset()
public float getYOffset()
public float getAngle()
public float getScale()
public boolean isFittingArea()
true the texture should fit the area to which it's applied.public void setFittingArea(boolean fittingArea)
public boolean isLeftToRightOriented()
true if the objects using this texture should take into account
the orientation of the texture.public boolean equals(java.lang.Object obj)
true if the object in parameter is equal to this texture.equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object

© Copyright 2024 Space Mushrooms
Distributed under GNU General Public License