Package com.ardor3d.scenegraph.extension
Class PassNodeState
java.lang.Object
com.ardor3d.scenegraph.extension.PassNodeState
- All Implemented Interfaces:
Savable
,Serializable
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
if false, pass will not be updated or rendered.protected final EnumMap
<RenderState.StateType, RenderState> RenderStates registered with this pass - if a given state is not null it overrides the corresponding state set during rendering. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
applyPassNodeStates
(RenderContext context) Applies all currently set renderstates to the supplied contextvoid
Clears an enforced render state index by setting it to null.void
sets all enforced states to nullClass
<? extends PassNodeState> boolean
void
read
(InputCapsule capsule) void
setEnabled
(boolean enabled) void
setPassState
(RenderState state) Enforce a particular state.void
write
(OutputCapsule capsule)
-
Field Details
-
_enabled
protected boolean _enabledif false, pass will not be updated or rendered. -
_passStates
RenderStates registered with this pass - if a given state is not null it overrides the corresponding state set during rendering.
-
-
Constructor Details
-
PassNodeState
public PassNodeState()
-
-
Method Details
-
applyPassNodeStates
Applies all currently set renderstates to the supplied context- Parameters:
context
- the render context
-
setPassState
Enforce a particular state. In other words, the given state will override any state of the same type set on a scene object. Remember to clear the state when done enforcing. Very useful for multipass techniques where multiple sets of states need to be applied to a scenegraph drawn multiple times.- Parameters:
state
- state to enforce
-
getPassState
- Parameters:
type
- the type to query- Returns:
- the state enforced for a give state type, or null if none.
-
clearPassState
Clears an enforced render state index by setting it to null. This allows object specific states to be used.- Parameters:
type
- The type of RenderState to clear enforcement on.
-
clearPassStates
public void clearPassStates()sets all enforced states to null -
isEnabled
public boolean isEnabled()- Returns:
- Returns the enabled.
-
setEnabled
public void setEnabled(boolean enabled) - Parameters:
enabled
- The enabled to set.
-
getClassTag
- Specified by:
getClassTag
in interfaceSavable
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-