Class PassNodeState

java.lang.Object
com.ardor3d.scenegraph.extension.PassNodeState
All Implemented Interfaces:
Savable, Serializable

public class PassNodeState extends Object implements Savable, Serializable
See Also:
  • Field Details

    • _enabled

      protected boolean _enabled
      if false, pass will not be updated or rendered.
    • _passStates

      protected final EnumMap<RenderState.StateType,RenderState> _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

      public void applyPassNodeStates(RenderContext context)
      Applies all currently set renderstates to the supplied context
      Parameters:
      context - the render context
    • setPassState

      public void setPassState(RenderState state)
      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

      public RenderState getPassState(RenderState.StateType type)
      Parameters:
      type - the type to query
      Returns:
      the state enforced for a give state type, or null if none.
    • clearPassState

      public void clearPassState(RenderState.StateType type)
      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

      public Class<? extends PassNodeState> getClassTag()
      Specified by:
      getClassTag in interface Savable
    • write

      public void write(OutputCapsule capsule) throws IOException
      Specified by:
      write in interface Savable
      Throws:
      IOException
    • read

      public void read(InputCapsule capsule) throws IOException
      Specified by:
      read in interface Savable
      Throws:
      IOException