com.jme.scene.state
Class CullState

java.lang.Object
  extended bycom.jme.scene.state.RenderState
      extended bycom.jme.scene.state.CullState
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LWJGLCullState

public abstract class CullState
extends RenderState

CullState determins which side of a model will be visible when it is rendered. By default, both sides are visible. Define front as the side that traces its vertexes counter clockwise and back as the side that traces its vertexes clockwise, a side (front or back) can be culled, or not shown when the model is rendered. Instead, the side will be transparent.

Version:
$Id: CullState.java,v 1.5 2005/03/06 23:33:54 Mojomonkey Exp $
Author:
Mark Powell, Jack Lindamood (javadoc only)
See Also:
Serialized Form

Field Summary
static int CS_BACK
          Cull the back sides.
static int CS_FRONT
          Cull the front sides.
static int CS_NONE
          No sides of the model's triangles are culled.
 
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
CullState()
           
 
Method Summary
 int getCullMode()
          Returns the current cull mode for this CullState.
 int getType()
          getType returns RenderState.RS_CULL
 void setCullMode(int mode)
          Sets the cull mode to the integer given.
 
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

CS_NONE

public static final int CS_NONE
No sides of the model's triangles are culled. This is default.

See Also:
Constant Field Values

CS_FRONT

public static final int CS_FRONT
Cull the front sides.

See Also:
Constant Field Values

CS_BACK

public static final int CS_BACK
Cull the back sides.

See Also:
Constant Field Values
Constructor Detail

CullState

public CullState()
Method Detail

getType

public int getType()
getType returns RenderState.RS_CULL

Specified by:
getType in class RenderState
Returns:
RenderState.RS_CULL
See Also:
RenderState.getType()

setCullMode

public void setCullMode(int mode)
Sets the cull mode to the integer given. mode most be one of CS_FRONT, CS_BACK, or CS_NONE

Parameters:
mode - The new cull mode.

getCullMode

public int getCullMode()
Returns the current cull mode for this CullState.

Returns:
The current cull mode.