com.jme.scene.state
Class ShadeState
java.lang.Object
com.jme.scene.state.RenderState
com.jme.scene.state.ShadeState
- All Implemented Interfaces:
- Savable
- Direct Known Subclasses:
- JOGLShadeState, LWJGLShadeState
public abstract class ShadeState
- extends RenderState
ShadeState maintains the interpolation of color between
vertices. Smooth shades the colors with proper linear interpolation, while
flat provides no smoothing. If this state is not enabled, Smooth is used.
- Version:
- $Id: ShadeState.java 4336 2009-05-03 20:57:01Z christoph.luder $
- Author:
- Mark Powell
| Fields inherited from class com.jme.scene.state.RenderState |
QUICK_COMPARE, RS_BLEND, RS_CLIP, RS_COLORMASK_STATE, RS_CULL, 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 |
ShadeState()
Constructor instantiates a new ShadeState object with the
default mode being smooth. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
shadeMode
protected ShadeState.ShadeMode shadeMode
ShadeState
public ShadeState()
- Constructor instantiates a new
ShadeState object with the
default mode being smooth.
getShadeMode
public ShadeState.ShadeMode getShadeMode()
getShade returns the current shading mode.
- Returns:
- the current shading mode.
setShadeMode
public void setShadeMode(ShadeState.ShadeMode shadeMode)
setShadeMode sets the current shading mode.
- Parameters:
shadeMode - the new shading mode.
- Throws:
java.lang.IllegalArgumentException - if shadeMode is null
getType
public int getType()
- Deprecated. As of 2.0, use
RenderState.getStateType() instead.
getType returns this type of this render state.
(RS_SHADE).
- Specified by:
getType in class RenderState
- Returns:
- An int identifying this render state.
- See Also:
RenderState.getType()
getStateType
public RenderState.StateType getStateType()
getStateType returns the type RenderState.StateType.Shade
- Specified by:
getStateType in class RenderState
- Returns:
RenderState.StateType.Shade- See Also:
RenderState.getStateType()
write
public void write(JMEExporter e)
throws java.io.IOException
- Specified by:
write in interface Savable- Overrides:
write in class RenderState
- Throws:
java.io.IOException
read
public void read(JMEImporter e)
throws java.io.IOException
- Specified by:
read in interface Savable- Overrides:
read in class RenderState
- Throws:
java.io.IOException
getClassTag
public java.lang.Class<?> getClassTag()
- Description copied from interface:
Savable
- The peristed type for the object.
Note that tag here does not mean XML tag, but the class that the object
is tagged with.
- Specified by:
getClassTag in interface Savable- Overrides:
getClassTag in class RenderState
Copyright 2003-2009 jMonkeyEngine