Package WildMagic.LibGraphics.Rendering
Class StencilState
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Rendering.GlobalState
-
- WildMagic.LibGraphics.Rendering.StencilState
-
- All Implemented Interfaces:
java.io.Serializable,StreamInterface
public class StencilState extends GlobalState implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classStencilState.CompareFunctionStencil compare function.static classStencilState.OperationTypeStencil operation type.-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.Rendering.GlobalState
GlobalState.StateType
-
-
Field Summary
Fields Modifier and Type Field Description StencilState.CompareFunctionCompareCompare function default: CF_NEVERbooleanEnabledEnabled default: falseintMaskMask default: ~0private static StencilState.CompareFunctionms_eCompareFunctionStaticInitializes static enum for compare function.private static StencilState.OperationTypems_eOperationTypeStaticInitializes static enum for operation type.private static java.util.HashMap<java.lang.Integer,StencilState.CompareFunction>ms_pkCompareFunctionMapMaps compare function enum to int values.private static java.util.HashMap<java.lang.Integer,StencilState.OperationType>ms_pkOperationTypeMapMaps operation type enum to int values.StencilState.OperationTypeOnFailOnFail default: OT_KEEPStencilState.OperationTypeOnZFailOnZFail default: OT_KEEPStencilState.OperationTypeOnZPassOnZPass default: OT_KEEPintReferenceRenference default: 0private static longserialVersionUIDintWriteMaskWrite Mask default: ~0-
Fields inherited from class WildMagic.LibGraphics.Rendering.GlobalState
Default, DefaultInitialized
-
-
Constructor Summary
Constructors Constructor Description StencilState()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intGetDiskUsed(StreamVersion rkVersion)Returns the size of this object and it's children on disk for the current StreamVersion parameter.GlobalState.StateTypeGetStateType()Return type.voidLoad(Stream rkStream, Stream.Link pkLink)Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.voidSave(Stream rkStream)Write this object and all it's children to the Stream.StringTreeSaveStrings(java.lang.String acTitle)Write this object into a StringTree for the scene-graph visualization.-
Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
dispose, GetAllObjectsByName, GetID, GetName, GetNextID, GetObjectByID, GetObjectByIDBase, GetObjectByName, GetObjectByNameBase, Link, Register, SetName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface WildMagic.LibGraphics.ObjectSystem.StreamInterface
Link, Register
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ms_pkCompareFunctionMap
private static java.util.HashMap<java.lang.Integer,StencilState.CompareFunction> ms_pkCompareFunctionMap
Maps compare function enum to int values.
-
ms_pkOperationTypeMap
private static java.util.HashMap<java.lang.Integer,StencilState.OperationType> ms_pkOperationTypeMap
Maps operation type enum to int values.
-
ms_eCompareFunctionStatic
private static StencilState.CompareFunction ms_eCompareFunctionStatic
Initializes static enum for compare function.
-
ms_eOperationTypeStatic
private static StencilState.OperationType ms_eOperationTypeStatic
Initializes static enum for operation type.
-
Enabled
public boolean Enabled
Enabled default: false
-
Compare
public StencilState.CompareFunction Compare
Compare function default: CF_NEVER
-
Reference
public int Reference
Renference default: 0
-
Mask
public int Mask
Mask default: ~0
-
WriteMask
public int WriteMask
Write Mask default: ~0
-
OnFail
public StencilState.OperationType OnFail
OnFail default: OT_KEEP
-
OnZFail
public StencilState.OperationType OnZFail
OnZFail default: OT_KEEP
-
OnZPass
public StencilState.OperationType OnZPass
OnZPass default: OT_KEEP
-
-
Method Detail
-
GetDiskUsed
public int GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.- Specified by:
GetDiskUsedin interfaceStreamInterface- Overrides:
GetDiskUsedin classGraphicsObject- Parameters:
rkVersion- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetStateType
public final GlobalState.StateType GetStateType()
Return type.- Specified by:
GetStateTypein classGlobalState- Returns:
- StateType.STENCIL;
-
Load
public void Load(Stream rkStream, Stream.Link pkLink)
Loads this object from the input parameter rkStream, using the input Stream.Link to store the IDs of children objects of this object for linking after all objects are loaded from the Stream.- Specified by:
Loadin interfaceStreamInterface- Overrides:
Loadin classGraphicsObject- Parameters:
rkStream- the Stream from which this object is being read.pkLink- the Link class for storing the IDs of this object's children objects.
-
Save
public void Save(Stream rkStream)
Write this object and all it's children to the Stream.- Specified by:
Savein interfaceStreamInterface- Overrides:
Savein classGraphicsObject- Parameters:
rkStream- the Stream where the child objects are stored.
-
SaveStrings
public StringTree SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.- Specified by:
SaveStringsin interfaceStreamInterface- Overrides:
SaveStringsin classGlobalState- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
-