|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.MaterialState
MaterialState defines a state to define an objects material
settings. Material is defined by the emissive quality of the object, the
ambient color, diffuse color and specular color. The material also defines
the shininess of the object and the alpha value of the object.
| Field Summary | |
protected static ColorRGBA |
currentAmbient
|
protected static ColorRGBA |
currentDiffuse
|
protected static ColorRGBA |
currentEmissive
|
protected static float |
currentShininess
|
protected static ColorRGBA |
currentSpecular
|
static ColorRGBA |
defaultAmbient
Default ambient color for all material states. |
static ColorRGBA |
defaultDiffuse
Default diffuse color for all material states. |
static ColorRGBA |
defaultEmissive
Default emissive color for all material states. |
static float |
defaultShininess
Default shininess for all material states. |
static ColorRGBA |
defaultSpecular
Default specular color for all material states. |
| Fields inherited from class com.jme.scene.state.RenderState |
RS_ALPHA, RS_ATTRIBUTE, RS_CULL, RS_DITHER, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER |
| Constructor Summary | |
MaterialState()
Constructor instantiates a new MaterialState object. |
|
| Method Summary | |
float |
getAlpha()
getAlpha returns the alpha value for this material state. |
ColorRGBA |
getAmbient()
getAmbient retreives the ambient color of the material. |
ColorRGBA |
getDiffuse()
getDiffuse retrieves the diffuse color of the material. |
ColorRGBA |
getEmissive()
getEmissive retrieves the emissive color of the material. |
float |
getShininess()
getShininess retrieves the shininess value of the material. |
ColorRGBA |
getSpecular()
getSpecular retrieves the specular color of the material. |
int |
getType()
getType returns the render state type of this. |
void |
setAlpha(float alpha)
setAlpha sets the alpha value for this material state. |
void |
setAmbient(ColorRGBA ambient)
setAmbient sets the ambient color of the material. |
void |
setDiffuse(ColorRGBA diffuse)
setDiffuse sets the diffuse color of the material. |
void |
setEmissive(ColorRGBA emissive)
setEmissive sets the emissive color of the material. |
void |
setShininess(float shininess)
setShininess sets the shininess of the material. |
void |
setSpecular(ColorRGBA specular)
setSpecular sets the specular color of the material. |
| Methods inherited from class com.jme.scene.state.RenderState |
apply, extract, isEnabled, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static ColorRGBA currentAmbient
protected static ColorRGBA currentDiffuse
protected static ColorRGBA currentSpecular
protected static ColorRGBA currentEmissive
protected static float currentShininess
public static final ColorRGBA defaultAmbient
public static final ColorRGBA defaultDiffuse
public static final ColorRGBA defaultSpecular
public static final ColorRGBA defaultEmissive
public static final float defaultShininess
| Constructor Detail |
public MaterialState()
MaterialState object.
| Method Detail |
public float getAlpha()
getAlpha returns the alpha value for this material state. This
value isn't actually used directly by jME. Alpha value is more for a user refrence.
AlphaStatepublic void setAlpha(float alpha)
setAlpha sets the alpha value for this material state. This
value isn't actually used directly by jME. Alpha value is more for a user
refrence.
alpha - The new alpha value of this material state.AlphaStatepublic ColorRGBA getAmbient()
getAmbient retreives the ambient color of the material.
public void setAmbient(ColorRGBA ambient)
setAmbient sets the ambient color of the material.
ambient - the ambient color of the material.public ColorRGBA getDiffuse()
getDiffuse retrieves the diffuse color of the material.
public void setDiffuse(ColorRGBA diffuse)
setDiffuse sets the diffuse color of the material.
diffuse - the diffuse color of the material.public ColorRGBA getEmissive()
getEmissive retrieves the emissive color of the material.
public void setEmissive(ColorRGBA emissive)
setEmissive sets the emissive color of the material.
emissive - the emissive color of the material.public float getShininess()
getShininess retrieves the shininess value of the material.
public void setShininess(float shininess)
setShininess sets the shininess of the material.
shininess - the shininess of the material.public ColorRGBA getSpecular()
getSpecular retrieves the specular color of the material.
public void setSpecular(ColorRGBA specular)
setSpecular sets the specular color of the material.
specular - the specular color of the material.public int getType()
getType returns the render state type of this.
(RS_MATERIAL).
getType in class RenderStateRenderState.getType()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||