Package com.luciad.format.object3d
Class TLcd3DMeshStyle
java.lang.Object
com.luciad.format.object3d.TLcd3DMeshStyle
- All Implemented Interfaces:
ILcd3DMeshStyle
Default implementation of ILcd3DMeshStyle.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the ambient color of this style.Returns the diffuse color of this style.Returns the emissive color of this style.double
Returns the specular exponent of this style.Returns the specular color of this style.Returns the path to a texture map for this style, or null if no texture is present.int
hashCode()
boolean
return true if the style is double sided.boolean
Returns true if this style is transparent.void
setAmbientColor
(Color aAmbientColor) Sets the ambient color of this style.void
setDiffuseColor
(Color aDiffuseColor) Sets the diffuse color of this style.void
setDoubleSided
(boolean aDoubleSided) Specifies whether or not the style is double sided.void
setEmissiveColor
(Color aEmissiveColor) Sets the emissive color of this style.void
setShininess
(double aShininess) Sets the specular exponent of this style.void
setSpecularColor
(Color aSpecularColor) Sets the specular color of this style.void
setTextureSourceName
(String aTextureSourceName) Sets the name of the texture image to be used with this style.void
setTransparent
(boolean aTransparent) Specifies whether or not this style requires transparency.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.luciad.format.object3d.ILcd3DMeshStyle
getGLTextureData, getTextureData
-
Constructor Details
-
TLcd3DMeshStyle
public TLcd3DMeshStyle()Constructs a new mesh style with sensible default values.- Ambient, specular and emissive: black
- Diffuse: white
- Shininess: zero
- Texture source name: null
- Transparent: false
- Double-sided: false
-
-
Method Details
-
getAmbientColor
Description copied from interface:ILcd3DMeshStyle
Returns the ambient color of this style. If the ambient color is unknown, returnsColor.BLACK
.- Specified by:
getAmbientColor
in interfaceILcd3DMeshStyle
- Returns:
- the ambient color of this style
-
setAmbientColor
Sets the ambient color of this style.- Parameters:
aAmbientColor
- a Color- See Also:
-
getDiffuseColor
Description copied from interface:ILcd3DMeshStyle
Returns the diffuse color of this style. If the diffuse color is unknown, returnsColor.WHITE
.- Specified by:
getDiffuseColor
in interfaceILcd3DMeshStyle
- Returns:
- the diffuse color of this style
-
setDiffuseColor
Sets the diffuse color of this style.- Parameters:
aDiffuseColor
- a Color- See Also:
-
getSpecularColor
Description copied from interface:ILcd3DMeshStyle
Returns the specular color of this style. If the specular color is unknown, returnsColor.BLACK
.- Specified by:
getSpecularColor
in interfaceILcd3DMeshStyle
- Returns:
- the specular color of this style
-
setSpecularColor
Sets the specular color of this style.- Parameters:
aSpecularColor
- a Color- See Also:
-
getEmissiveColor
Description copied from interface:ILcd3DMeshStyle
Returns the emissive color of this style. If the emissive color is unknown, returnsColor.BLACK
.- Specified by:
getEmissiveColor
in interfaceILcd3DMeshStyle
- Returns:
- the emissive color of this style
-
setEmissiveColor
Sets the emissive color of this style.- Parameters:
aEmissiveColor
- a Color- See Also:
-
getShininess
public double getShininess()Description copied from interface:ILcd3DMeshStyle
Returns the specular exponent of this style. The value must lie between 0 and 128, inclusive. If the specular exponent is unknown, returns zero.- Specified by:
getShininess
in interfaceILcd3DMeshStyle
- Returns:
- the specular exponent of this style
-
setShininess
public void setShininess(double aShininess) Sets the specular exponent of this style. The value must lie between 0 and 128, inclusive.- Parameters:
aShininess
- the specular exponent- See Also:
-
isTransparent
public boolean isTransparent()Description copied from interface:ILcd3DMeshStyle
Returns true if this style is transparent.- Specified by:
isTransparent
in interfaceILcd3DMeshStyle
- Returns:
- true if this style is transparent
-
setTransparent
public void setTransparent(boolean aTransparent) Specifies whether or not this style requires transparency.- Parameters:
aTransparent
- true if this style is transparent- See Also:
-
getTextureSourceName
Description copied from interface:ILcd3DMeshStyle
Returns the path to a texture map for this style, or null if no texture is present.- Specified by:
getTextureSourceName
in interfaceILcd3DMeshStyle
- Returns:
- the path to a texture map for this style
-
setTextureSourceName
Sets the name of the texture image to be used with this style.- Parameters:
aTextureSourceName
- the name of a texture image- See Also:
-
equals
-
hashCode
public int hashCode() -
isDoubleSided
public boolean isDoubleSided()return true if the style is double sided. If true, back-face culling is disabled during rendering of theILcdStyled3DMesh
.- Returns:
- true if the style is double sided.
-
setDoubleSided
public void setDoubleSided(boolean aDoubleSided) Specifies whether or not the style is double sided.- Parameters:
aDoubleSided
- true if the style is double sided.- See Also:
-