|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.StencilState
The StencilState RenderState allows the user to set the attributes of the stencil buffer of the renderer. The Stenciling is similar to Z-Buffering in that it allows enabling and disabling drawing on a per pixel basis. You can use the stencil plane to mask out portions of the rendering to create special effects, such as outlining or planar shadows.
| Field Summary | |
static int |
SF_ALWAYS
A stencil function that always passes. |
static int |
SF_EQUAL
A stencil function that passes if (ref & max) == (stencil & mask). |
static int |
SF_GEQUAL
A stencil function that passes if (ref & max) >= (stencil & mask). |
static int |
SF_GREATER
A stencil function that passes if (ref & max) > (stencil & mask). |
static int |
SF_LEQUAL
A stencil function that passes if (ref & max) <= (stencil & mask). |
static int |
SF_LESS
A stencil function that passes if (ref & mask) < (stencil & mask). |
static int |
SF_NEVER
A stencil function that never passes. |
static int |
SF_NOTEQUAL
A stencil function that passes if (ref & max) != (stencil & mask). |
static int |
SO_DECR
A stencil function result that decrements the current stencil buffer value. |
static int |
SO_INCR
A stencil function result that increments the current stencil buffer value. |
static int |
SO_INVERT
A stencil function result that bitwise inverts the current stencil buffer value. |
static int |
SO_KEEP
A stencil function result that keeps the current value. |
static int |
SO_REPLACE
A stencil function result that sets the stencil buffer value to ref, as specified by stencil function. |
static int |
SO_ZERO
A stencil function result that sets the stencil buffer value to 0. |
| 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 | |
StencilState()
|
|
| Method Summary | |
int |
getStencilFunc()
Returns the currently set stencil function. |
int |
getStencilMask()
Returns the currently set stencil mask. |
int |
getStencilOpFail()
Returns the current stencil operation. |
int |
getStencilOpZFail()
Returns the current Z op fail function. |
int |
getStencilOpZPass()
Returns the current Z op pass function. |
int |
getStencilRef()
Returns the currently set stencil reference. |
int |
getType()
Returns RS_STENCIL |
void |
setStencilFunc(int func)
Sets the function that defines if a stencil test passes or not. |
void |
setStencilMask(int mask)
Sets the stencil mask to be used during the stencil function. |
void |
setStencilOpFail(int op)
Specifies the aciton to take when the stencil test fails. |
void |
setStencilOpZFail(int op)
Specifies stencil action when the stencil test passes, but the depth test fails. |
void |
setStencilOpZPass(int op)
Specifies stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. |
void |
setStencilRef(int ref)
Sets the stencil reference to be used during the stencil function. |
| 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 |
public static final int SF_NEVER
public static final int SF_LESS
public static final int SF_LEQUAL
public static final int SF_GREATER
public static final int SF_GEQUAL
public static final int SF_EQUAL
public static final int SF_NOTEQUAL
public static final int SF_ALWAYS
public static final int SO_KEEP
public static final int SO_ZERO
public static final int SO_REPLACE
public static final int SO_INCR
public static final int SO_DECR
public static final int SO_INVERT
| Constructor Detail |
public StencilState()
| Method Detail |
public int getType()
getType in class RenderStateRenderState.getType()public void setStencilFunc(int func)
func - The new stencil function.public int getStencilFunc()
public void setStencilRef(int ref)
ref - The new stencil reference.public int getStencilRef()
public void setStencilMask(int mask)
mask - The new stencil mask.public int getStencilMask()
public void setStencilOpFail(int op)
op - The new stencil operation.public int getStencilOpFail()
public void setStencilOpZFail(int op)
op - The Z test operation to set.public int getStencilOpZFail()
public void setStencilOpZPass(int op)
op - The new Z test pass operation to set.public int getStencilOpZPass()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||