Package WildMagic.LibGraphics.Effects
Class LatticeEffect
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Effects.Effect
-
- WildMagic.LibGraphics.Effects.ShaderEffect
-
- WildMagic.LibGraphics.Effects.LatticeEffect
-
- All Implemented Interfaces:
java.io.Serializable
,NameIdInterface
,StreamInterface
public class LatticeEffect extends ShaderEffect implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected float[]
m_afScale
The scale is stored at index 0, 1.protected float[]
m_afThreshold
private static long
serialVersionUID
-
Fields inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
m_iPassQuantity, m_kAlphaState, m_kCompiledPrograms, m_kPShader, m_kVShader
-
-
Constructor Summary
Constructors Constructor Description LatticeEffect()
streaming constructorLatticeEffect(java.lang.String acBaseName, java.lang.String acGradName)
Creates an LatticeEffect withe the texture images in the acBaseName and acGradName image files.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Delete memoryint
GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.Vector2f
GetScale()
Parameters for the pixel programVector2f
GetThreshold()
Parameters for the pixel programvoid
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.void
OnLoadPrograms(int iPass, Program pkVProgram, Program pkPProgram, Program pkCProgram)
Set the user-defined constants to use local storage.void
Save(Stream rkStream)
Write this object and all it's children to the Stream.StringTree
SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.void
SetScale(Vector2f rkScale)
Parameters for the pixel programvoid
SetThreshold(Vector2f rkThreshold)
Parameters for the pixel program-
Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
GetAllObjectsByName, GetBlending, GetCProgram, GetObjectByID, GetObjectByName, GetPassQuantity, GetPProgram, GetSamplerInformation, GetTexture, GetTexture, GetTextureQuantity, GetVProgram, Link, LoadPrograms, LoadResources, OnReleasePrograms, Register, ReleasePrograms, ReleaseResources, RestoreGlobalState, SetCProgram, SetDefaultAlphaState, SetGlobalState, SetPassQuantity, SetPShader, SetVShader
-
Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
GetID, GetName, GetNextID, GetObjectByIDBase, GetObjectByNameBase, 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
-
m_afScale
protected float[] m_afScale
The scale is stored at index 0, 1. The other values are unused.
-
m_afThreshold
protected float[] m_afThreshold
-
-
Constructor Detail
-
LatticeEffect
public LatticeEffect()
streaming constructor
-
LatticeEffect
public LatticeEffect(java.lang.String acBaseName, java.lang.String acGradName)
Creates an LatticeEffect withe the texture images in the acBaseName and acGradName image files.- Parameters:
acBaseName
- the base image texture.acGradName
- the gradient image texture.
-
-
Method Detail
-
dispose
public void dispose()
Delete memory- Overrides:
dispose
in classShaderEffect
-
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 classShaderEffect
- Parameters:
rkVersion
- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetScale
public Vector2f GetScale()
Parameters for the pixel program- Returns:
- the direction of flow for the cloud effect.
-
GetThreshold
public Vector2f GetThreshold()
Parameters for the pixel program- Returns:
- the direction of flow for the cloud effect.
-
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 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.
-
OnLoadPrograms
public void OnLoadPrograms(int iPass, Program pkVProgram, Program pkPProgram, Program pkCProgram)
Set the user-defined constants to use local storage.- Overrides:
OnLoadPrograms
in classShaderEffect
- Parameters:
iPass
-pkVProgram
- the VertexProgram for this EffectpkPProgram
- the PixelProgram for this Effect
-
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 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:
SaveStrings
in interfaceStreamInterface
- Overrides:
SaveStrings
in 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.
-
SetScale
public void SetScale(Vector2f rkScale)
Parameters for the pixel program- Parameters:
rkScale
-
-
SetThreshold
public void SetThreshold(Vector2f rkThreshold)
Parameters for the pixel program- Parameters:
rkThreshold
-
-
-