Package com.ardor3d.renderer.state
Class ZBufferState
java.lang.Object
com.ardor3d.renderer.state.RenderState
com.ardor3d.renderer.state.ZBufferState
- All Implemented Interfaces:
- Savable
ZBufferState maintains how the use of the depth buffer is to occur. Depth buffer comparisons are used to
 evaluate what incoming fragment will be used. This buffer is based on z depth, or distance between the pixel source
 and the eye.- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class com.ardor3d.renderer.state.RenderStateRenderState.StateStack, RenderState.StateType
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected ZBufferState.TestFunctionDepth function.protected booleanDepth mask is writable or not.Fields inherited from class com.ardor3d.renderer.state.RenderState_quickCompare
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetFunctionreturns the current depth function.getType()booleanisWritablereturns if the depth mask is writable or not.voidread(InputCapsule capsule) voidsetFunction(ZBufferState.TestFunction function) setFunctionsets the depth function.voidsetWritable(boolean writable) setWritablesets the depth mask writable or not.voidwrite(OutputCapsule capsule) Methods inherited from class com.ardor3d.renderer.state.RenderStatecreateState, extract, getClassTag, isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares
- 
Field Details- 
_functionDepth function.
- 
_writableprotected boolean _writableDepth mask is writable or not.
 
- 
- 
Constructor Details- 
ZBufferStatepublic ZBufferState()Constructor instantiates a newZBufferStateobject. The initial values are TestFunction.LessThan and depth writing on.
 
- 
- 
Method Details- 
getFunctiongetFunctionreturns the current depth function.- Returns:
- the depth function currently used.
 
- 
setFunctionsetFunctionsets the depth function.- Parameters:
- function- the depth function.
- Throws:
- IllegalArgumentException- if function is null
 
- 
isWritablepublic boolean isWritable()isWritablereturns if the depth mask is writable or not.- Returns:
- true if the depth mask is writable, false otherwise.
 
- 
setWritablepublic void setWritable(boolean writable) setWritablesets the depth mask writable or not.- Parameters:
- writable- true to turn on depth writing, false otherwise.
 
- 
getType- Specified by:
- getTypein class- RenderState
- Returns:
- An statetype enum value for the subclass.
- See Also:
 
- 
write- Specified by:
- writein interface- Savable
- Overrides:
- writein class- RenderState
- Throws:
- IOException
 
- 
read- Specified by:
- readin interface- Savable
- Overrides:
- readin class- RenderState
- Throws:
- IOException
 
- 
createStateRecord- Specified by:
- createStateRecordin class- RenderState
 
 
-