Package WildMagic.LibGraphics.Rendering
Class AlphaState
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Rendering.GlobalState
-
- WildMagic.LibGraphics.Rendering.AlphaState
-
- All Implemented Interfaces:
java.io.Serializable
,StreamInterface
public class AlphaState extends GlobalState implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AlphaState.BlendEquationMode
Alpha blending: alpha-test modes.static class
AlphaState.DstBlendMode
Alpha blending: destination blend modes.static class
AlphaState.SrcBlendMode
Alpha blending: source blend modes.static class
AlphaState.TestMode
Alpha blending: alpha-test modes.-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.Rendering.GlobalState
GlobalState.StateType
-
-
Field Summary
Fields Modifier and Type Field Description boolean
BlendEnabled
Alpha blending enabled: default: false.AlphaState.BlendEquationMode
BlendEquation
Blend Equation default: BE_ADDstatic java.util.HashMap<java.lang.Integer,AlphaState.BlendEquationMode>
BlendEquationMap
Maps alpha-test enum to int values.ColorRGBA
ConstantColor
Constant color default: (0,0,0,0)AlphaState.DstBlendMode
DstBlend
Destination blend mode default: DBF_ONE_MINUS_SRC_ALPHAstatic java.util.HashMap<java.lang.Integer,AlphaState.DstBlendMode>
DstBlendModeMap
Maps destination blend enum to int values.private static AlphaState.BlendEquationMode
ms_eBlendEquationStatic
private static AlphaState.DstBlendMode
ms_eDstBlendModeStatic
Initializes static enum for dst blend modes.private static AlphaState.SrcBlendMode
ms_eSrcBlendModeStatic
Initializes static enum for src blend modes.private static AlphaState.TestMode
ms_eTestModeStatic
Initializes static enum for alpha-test modes.float
Reference
Reference default: 0, always in [0,1]private static long
serialVersionUID
AlphaState.SrcBlendMode
SrcBlend
Source blend mode default: SBF_SRC_ALPHAstatic java.util.HashMap<java.lang.Integer,AlphaState.SrcBlendMode>
SrcBlendModeMap
Maps source blend enum to int values.AlphaState.TestMode
Test
Test mode: default: TF_ALWAYSboolean
TestEnabled
Alpha test enabled default: false;static java.util.HashMap<java.lang.Integer,AlphaState.TestMode>
TestModeMap
Maps alpha-test enum to int values.-
Fields inherited from class WildMagic.LibGraphics.Rendering.GlobalState
Default, DefaultInitialized
-
-
Constructor Summary
Constructors Constructor Description AlphaState()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.GlobalState.StateType
GetStateType()
Return type.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.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.boolean
Register(Stream rkStream)
Registers this object with the input Stream parameter.void
Save(Stream rkStream)
Write this object and all it's children to the Stream.StringTree
SaveStrings(java.lang.String kString)
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
-
SrcBlendModeMap
public static java.util.HashMap<java.lang.Integer,AlphaState.SrcBlendMode> SrcBlendModeMap
Maps source blend enum to int values.
-
DstBlendModeMap
public static java.util.HashMap<java.lang.Integer,AlphaState.DstBlendMode> DstBlendModeMap
Maps destination blend enum to int values.
-
TestModeMap
public static java.util.HashMap<java.lang.Integer,AlphaState.TestMode> TestModeMap
Maps alpha-test enum to int values.
-
BlendEquationMap
public static java.util.HashMap<java.lang.Integer,AlphaState.BlendEquationMode> BlendEquationMap
Maps alpha-test enum to int values.
-
ms_eSrcBlendModeStatic
private static AlphaState.SrcBlendMode ms_eSrcBlendModeStatic
Initializes static enum for src blend modes.
-
ms_eDstBlendModeStatic
private static AlphaState.DstBlendMode ms_eDstBlendModeStatic
Initializes static enum for dst blend modes.
-
ms_eTestModeStatic
private static AlphaState.TestMode ms_eTestModeStatic
Initializes static enum for alpha-test modes.
-
ms_eBlendEquationStatic
private static AlphaState.BlendEquationMode ms_eBlendEquationStatic
-
BlendEnabled
public boolean BlendEnabled
Alpha blending enabled: default: false.
-
SrcBlend
public AlphaState.SrcBlendMode SrcBlend
Source blend mode default: SBF_SRC_ALPHA
-
DstBlend
public AlphaState.DstBlendMode DstBlend
Destination blend mode default: DBF_ONE_MINUS_SRC_ALPHA
-
BlendEquation
public AlphaState.BlendEquationMode BlendEquation
Blend Equation default: BE_ADD
-
TestEnabled
public boolean TestEnabled
Alpha test enabled default: false;
-
Test
public AlphaState.TestMode Test
Test mode: default: TF_ALWAYS
-
Reference
public float Reference
Reference default: 0, always in [0,1]
-
ConstantColor
public ColorRGBA ConstantColor
Constant color default: (0,0,0,0)
-
-
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:
GetDiskUsed
in interfaceStreamInterface
- Overrides:
GetDiskUsed
in 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:
GetStateType
in classGlobalState
- Returns:
- StateType.ALPHA;
-
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:
Link
in interfaceStreamInterface
- Overrides:
Link
in 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:
Load
in interfaceStreamInterface
- Overrides:
Load
in 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:
Register
in interfaceStreamInterface
- Overrides:
Register
in 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:
Save
in interfaceStreamInterface
- Overrides:
Save
in classGraphicsObject
- Parameters:
rkStream
- the Stream where the child objects are stored.
-
SaveStrings
public StringTree SaveStrings(java.lang.String kString)
Write this object into a StringTree for the scene-graph visualization.- Specified by:
SaveStrings
in interfaceStreamInterface
- Overrides:
SaveStrings
in classGlobalState
- Parameters:
kString
- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
-