Package WildMagic.LibGraphics.Rendering
Class CullState
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Rendering.GlobalState
-
- WildMagic.LibGraphics.Rendering.CullState
-
- All Implemented Interfaces:
java.io.Serializable,StreamInterface
public class CullState extends GlobalState implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCullState.CullModeCulling mode.static classCullState.FrontModeFront-facing polygon mode.-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.Rendering.GlobalState
GlobalState.StateType
-
-
Field Summary
Fields Modifier and Type Field Description CullState.CullModeCullFaceCullMode default: CT_BACKbooleanEnabledCulling enabled default: trueCullState.FrontModeFrontFaceFrontMode default: FT_CCWprivate static CullState.CullModems_eCullModeStaticInitializes static CullMode enumprivate static CullState.FrontModems_eFrontModeStaticInitializes static FrontMode enumprivate static java.util.HashMap<java.lang.Integer,CullState.CullMode>ms_pkCullModeMapMaps culling mode enum to int values.private static java.util.HashMap<java.lang.Integer,CullState.FrontMode>ms_pkFrontModeMapMaps front facing mode enum to int values.private static longserialVersionUID-
Fields inherited from class WildMagic.LibGraphics.Rendering.GlobalState
Default, DefaultInitialized
-
-
Constructor Summary
Constructors Constructor Description CullState()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.voidLink(Stream rkStream, Stream.Link pkLink)Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.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.booleanRegister(Stream rkStream)Registers this object with the input Stream parameter.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, SetName
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
ms_pkFrontModeMap
private static java.util.HashMap<java.lang.Integer,CullState.FrontMode> ms_pkFrontModeMap
Maps front facing mode enum to int values.
-
ms_pkCullModeMap
private static java.util.HashMap<java.lang.Integer,CullState.CullMode> ms_pkCullModeMap
Maps culling mode enum to int values.
-
ms_eFrontModeStatic
private static CullState.FrontMode ms_eFrontModeStatic
Initializes static FrontMode enum
-
ms_eCullModeStatic
private static CullState.CullMode ms_eCullModeStatic
Initializes static CullMode enum
-
Enabled
public boolean Enabled
Culling enabled default: true
-
FrontFace
public CullState.FrontMode FrontFace
FrontMode default: FT_CCW
-
CullFace
public CullState.CullMode CullFace
CullMode default: CT_BACK
-
-
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.CULL;
-
Link
public void Link(Stream rkStream, Stream.Link pkLink)
Copies this objects children objects from the input Stream's HashTable, based on the LinkID of the child stored in the pkLink parameter.- Specified by:
Linkin interfaceStreamInterface- Overrides:
Linkin classGraphicsObject- Parameters:
rkStream- the Stream where the child objects are stored.pkLink- the Link class from which the child object IDs are read.
-
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.
-
Register
public boolean Register(Stream rkStream)
Registers this object with the input Stream parameter. All objects streamed to disk are registered with the Stream so that a unique list of objects is maintained.- Specified by:
Registerin interfaceStreamInterface- Overrides:
Registerin classGraphicsObject- Parameters:
rkStream- the Stream where the child objects are stored.- Returns:
- true if this object is registered, false if the object has already been registered.
-
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.
-
-