Package com.ardor3d.renderer.state
Class ShadingState
java.lang.Object
com.ardor3d.renderer.state.RenderState
com.ardor3d.renderer.state.ShadingState
- All Implemented Interfaces:
Savable
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.-
Nested Class Summary
Nested classes/interfaces inherited from class com.ardor3d.renderer.state.RenderState
RenderState.StateStack, RenderState.StateType
-
Field Summary
Fields inherited from class com.ardor3d.renderer.state.RenderState
_quickCompare
-
Constructor Summary
ConstructorDescriptionConstructor instantiates a newShadeState
object with the default mode being smooth. -
Method Summary
Modifier and TypeMethodDescriptiongetShade
returns the current shading mode.getType()
void
read
(InputCapsule capsule) void
setShadingMode
(ShadingState.ShadingMode shadeMode) setShadeMode
sets the current shading mode.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.renderer.state.RenderState
createState, extract, getClassTag, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
-
Field Details
-
_shadeMode
-
-
Constructor Details
-
ShadingState
public ShadingState()Constructor instantiates a newShadeState
object with the default mode being smooth.
-
-
Method Details
-
getShadingMode
getShade
returns the current shading mode.- Returns:
- the current shading mode.
-
setShadingMode
setShadeMode
sets the current shading mode.- Parameters:
shadeMode
- the new shading mode.- Throws:
IllegalArgumentException
- if shadeMode is null
-
getType
- Specified by:
getType
in classRenderState
- Returns:
- An statetype enum value for the subclass.
- See Also:
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classRenderState
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classRenderState
- Throws:
IOException
-
createStateRecord
- Specified by:
createStateRecord
in classRenderState
-