Package WildMagic.LibGraphics.Effects
Class Effect
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Effects.Effect
-
- All Implemented Interfaces:
java.io.Serializable,StreamInterface
- Direct Known Subclasses:
PlanarReflectionEffect,PlanarShadowEffect,ShaderEffect
public abstract class Effect extends GraphicsObject implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description Effect()Streaming constructor:
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidDraw(Renderer pkRenderer, Spatial pkGlobalObject, int iMin, int iMax, VisibleObject[] akVisible)Override this function to obtain whatever drawing behavior your effect requires.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.voidLoadResources(Renderer pkRenderer, Geometry pkGeometry)Override these to allow loading and releasing of any resources your effect requires.booleanRegister(Stream rkStream)Registers this object with the input Stream parameter.voidReleaseResources(Renderer pkRenderer, Geometry pkGeometry)Override these to allow loading and releasing of any resources your effect requires.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
-
-
Method Detail
-
Draw
public void Draw(Renderer pkRenderer, Spatial pkGlobalObject, int iMin, int iMax, VisibleObject[] akVisible)
Override this function to obtain whatever drawing behavior your effect requires. If this is not overridden, the default behavior is to draw all the Geometry objects in akVisible.- Parameters:
pkRenderer-pkGlobalObject-iMin- the first VisibleObject to drawiMax- the last VisibleObject to drawakVisible- the list VisibleObjects to draw
-
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.
-
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.
-
LoadResources
public void LoadResources(Renderer pkRenderer, Geometry pkGeometry)
Override these to allow loading and releasing of any resources your effect requires. The defaults are to do nothing. The functions are called by Renderer::LoadResources and Renderer::ReleaseResources for Geometry and Effect objects.- Parameters:
pkRenderer-pkGeometry-
-
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.
-
ReleaseResources
public void ReleaseResources(Renderer pkRenderer, Geometry pkGeometry)
Override these to allow loading and releasing of any resources your effect requires. The defaults are to do nothing. The functions are called by Renderer::LoadResources and Renderer::ReleaseResources for Geometry and Effect objects.- Parameters:
pkRenderer-pkGeometry-
-
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 classGraphicsObject- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
-