Package WildMagic.LibGraphics.Effects
Class WireframeBehindEffect
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Effects.Effect
-
- WildMagic.LibGraphics.Effects.ShaderEffect
-
- WildMagic.LibGraphics.Effects.WireframeBehindEffect
-
- All Implemented Interfaces:
java.io.Serializable,NameIdInterface,StreamInterface
public class WireframeBehindEffect extends ShaderEffect implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private floatm_fSaveLineWidthprivate CullStatem_spkCullStateSaved and modified rendering statesprivate CullStatem_spkSaveCullStateSaved and modified rendering statesprivate WireframeStatem_spkSaveWireframeStateprivate WireframeStatem_spkWireframeStateprivate static longserialVersionUIDprivate java.lang.StringvertexShaderString-
Fields inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
m_iPassQuantity, m_kAlphaState, m_kCompiledPrograms, m_kPShader, m_kVShader
-
-
Constructor Summary
Constructors Constructor Description WireframeBehindEffect()Creates an new WireframeBehindEffect
-
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.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.voidRestoreGlobalState(int iPass, Renderer pkRenderer, boolean bPrimaryEffect)Restore saved states.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.voidSetGlobalState(int iPass, Renderer pkRenderer, boolean bPrimaryEffect)Override the default rendering state, to change cull state, wireframe state and line width so we render a black outline of the back faces of the model.-
Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
dispose, GetAllObjectsByName, GetBlending, GetCProgram, GetObjectByID, GetObjectByName, GetPassQuantity, GetPProgram, GetSamplerInformation, GetTexture, GetTexture, GetTextureQuantity, GetVProgram, LoadPrograms, LoadResources, OnLoadPrograms, OnReleasePrograms, ReleasePrograms, ReleaseResources, SetCProgram, SetDefaultAlphaState, SetPassQuantity, SetPShader, SetVShader
-
Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
GetID, GetName, GetNextID, GetObjectByIDBase, GetObjectByNameBase, SetName
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_spkSaveCullState
private CullState m_spkSaveCullState
Saved and modified rendering states
-
m_spkCullState
private CullState m_spkCullState
Saved and modified rendering states
-
m_spkSaveWireframeState
private WireframeState m_spkSaveWireframeState
-
m_spkWireframeState
private WireframeState m_spkWireframeState
-
m_fSaveLineWidth
private float m_fSaveLineWidth
-
vertexShaderString
private java.lang.String vertexShaderString
-
-
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 classShaderEffect- Parameters:
rkVersion- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
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 classShaderEffect- 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 classShaderEffect- 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 classShaderEffect- 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.
-
RestoreGlobalState
public void RestoreGlobalState(int iPass, Renderer pkRenderer, boolean bPrimaryEffect)Restore saved states.- Overrides:
RestoreGlobalStatein classShaderEffect- Parameters:
iPass- the ith rendering passpkRenderer- the Rendering objectbPrimaryEffect- primary or secondary
-
Save
public void Save(Stream rkStream)
Write this object and all it's children to the Stream.- Specified by:
Savein interfaceStreamInterface- Overrides:
Savein classShaderEffect- 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 classShaderEffect- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
SetGlobalState
public void SetGlobalState(int iPass, Renderer pkRenderer, boolean bPrimaryEffect)Override the default rendering state, to change cull state, wireframe state and line width so we render a black outline of the back faces of the model. If the normal model is drawn, too, this shows as silhouette edges.- Overrides:
SetGlobalStatein classShaderEffect- Parameters:
iPass- the ith rendering passpkRenderer- the Rendering objectbPrimaryEffect- primary or secondary
-
-