Class GraphicsObject
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
BoundingVolume
,Camera
,CollapseRecordArray
,Effect
,GlobalState
,GraphicsImage
,Light
,Shader
,Spatial
public abstract class GraphicsObject extends java.lang.Object implements java.io.Serializable
root class of object system- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
m_kName
private int
m_uiID
private static int
ms_uiNextID
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description GraphicsObject()
default constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Delete memory.void
GetAllObjectsByName(java.lang.String rkName, java.util.Vector<GraphicsObject> rkObjects)
int
GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.int
GetID()
java.lang.String
GetName()
static int
GetNextID()
GraphicsObject
GetObjectByID(int uiID)
GraphicsObject
GetObjectByIDBase(int uiID)
GraphicsObject
GetObjectByName(java.lang.String rkName)
GraphicsObject
GetObjectByNameBase(java.lang.String rkName)
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 its children to the Stream.StringTree
SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.void
SetName(java.lang.String rkName)
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_kName
private java.lang.String m_kName
-
m_uiID
private int m_uiID
-
ms_uiNextID
private static int ms_uiNextID
-
-
Method Detail
-
GetNextID
public static int GetNextID()
-
dispose
public void dispose()
Delete memory.
-
GetAllObjectsByName
public void GetAllObjectsByName(java.lang.String rkName, java.util.Vector<GraphicsObject> rkObjects)
-
GetDiskUsed
public int GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.- Parameters:
rkVersion
- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetID
public int GetID()
-
GetName
public java.lang.String GetName()
-
GetObjectByID
public GraphicsObject GetObjectByID(int uiID)
-
GetObjectByIDBase
public GraphicsObject GetObjectByIDBase(int uiID)
-
GetObjectByName
public GraphicsObject GetObjectByName(java.lang.String rkName)
-
GetObjectByNameBase
public GraphicsObject GetObjectByNameBase(java.lang.String rkName)
-
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.- 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.- 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.- 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 its children to the Stream.- 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.- Parameters:
acTitle
- the header for this object in the StringTree, may be null- Returns:
- StringTree containing a String-based representation of this object and its children.
-
SetName
public void SetName(java.lang.String rkName)
-
-