Package WildMagic.LibGraphics.Detail
Class BillboardNode
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.SceneGraph.Spatial
-
- WildMagic.LibGraphics.SceneGraph.Node
-
- WildMagic.LibGraphics.Detail.BillboardNode
-
- All Implemented Interfaces:
java.io.Serializable,NameIdInterface,StreamInterface
public class BillboardNode extends Node implements NameIdInterface, StreamInterface
The model space of the billboard has an up vector of (0,1,0) that is chosen to be the billboard's axis of rotation.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.SceneGraph.Spatial
Spatial.CullingMode
-
-
Field Summary
Fields Modifier and Type Field Description protected Matrix3fm_kRotateprotected Cameram_spkCameraCamera to which the billboard is alignedprivate static longserialVersionUID-
Fields inherited from class WildMagic.LibGraphics.SceneGraph.Spatial
Culling, Local, m_iStartEffect, m_kEffects, m_kGlobalStates, m_kLights, m_pkParent, World, WorldBound, WorldBoundIsCurrent, WorldIsCurrent
-
-
Constructor Summary
Constructors Constructor Description BillboardNode()Default constructor, uninitializedBillboardNode(Camera pkCamera)Construction and destruction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAlignTo(Camera pkCamera)the camera to which the billboard is alignedvoiddispose()delete memoryvoidGetAllObjectsByName(java.lang.String rkName, java.util.Vector<GraphicsObject> rkObjects)Writes all GraphicsObjects with the name that matches the input parameter, rkName into the Vector parameter rkObjects.intGetDiskUsed(StreamVersion rkVersion)Returns the size of this object and it's children on disk for the current StreamVersion parameter.GraphicsObjectGetObjectByID(int uiID)Returns the GraphicsObject with the ID that matches the input parameter, uiID.GraphicsObjectGetObjectByName(java.lang.String rkName)Returns the GraphicsObject with the name that matches the input parameter, rkName.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.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.voidSetLocalRotate(Matrix3f kRotate)protected voidUpdateWorldData(double dAppTime)geometric updates-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.Node
AttachChild, DetachAllChildren, DetachChild, DetachChildAt, GetChild, GetQuantity, GetVisibleSet, SetChild, UpdateState, UpdateWorldBound
-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.Spatial
AttachEffect, AttachGlobalState, AttachLight, DetachAllEffects, DetachAllGlobalStates, DetachAllLights, DetachEffect, DetachGlobalState, DetachLight, GetEffect, GetEffectQuantity, GetGlobalState, GetGlobalState, GetGlobalStateQuantity, GetLight, GetLightQuantity, GetParent, GetStartEffect, OnGetVisibleSet, PopState, PropagateBoundToRoot, PropagateStateFromRoot, PushState, SetParent, SetStartEffect, UpdateBS, UpdateGS, UpdateGS, UpdateRS, UpdateRS
-
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_spkCamera
protected Camera m_spkCamera
Camera to which the billboard is aligned
-
m_kRotate
protected Matrix3f m_kRotate
-
-
Constructor Detail
-
BillboardNode
public BillboardNode(Camera pkCamera)
Construction and destruction.- Parameters:
pkCamera- to which the billboard is aligned
-
BillboardNode
public BillboardNode()
Default constructor, uninitialized
-
-
Method Detail
-
AlignTo
public void AlignTo(Camera pkCamera)
the camera to which the billboard is aligned- Parameters:
pkCamera- to which the billboard is aligned
-
UpdateWorldData
protected void UpdateWorldData(double dAppTime)
geometric updates- Overrides:
UpdateWorldDatain classNode- Parameters:
dAppTime- animation time for updating any controllers associated with this object
-
GetObjectByName
public GraphicsObject GetObjectByName(java.lang.String rkName)
Returns the GraphicsObject with the name that matches the input parameter, rkName.- Specified by:
GetObjectByNamein interfaceNameIdInterface- Overrides:
GetObjectByNamein classNode- Parameters:
rkName- the name of the object to return.- Returns:
- the GraphicsObject that matches the input name.
-
GetAllObjectsByName
public void GetAllObjectsByName(java.lang.String rkName, java.util.Vector<GraphicsObject> rkObjects)Writes all GraphicsObjects with the name that matches the input parameter, rkName into the Vector parameter rkObjects.- Specified by:
GetAllObjectsByNamein interfaceNameIdInterface- Overrides:
GetAllObjectsByNamein classNode- Parameters:
rkName- the name of the objects to return.rkObjects- a Vector of all objects with the matching name.
-
GetObjectByID
public GraphicsObject GetObjectByID(int uiID)
Returns the GraphicsObject with the ID that matches the input parameter, uiID.- Specified by:
GetObjectByIDin interfaceNameIdInterface- Overrides:
GetObjectByIDin classNode- Parameters:
uiID- the ID of the object to return.- Returns:
- the GraphicsObject that matches the input name.
-
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 classNode- 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.
-
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 classNode- Parameters:
rkStream- the Stream where the child objects are stored.pkLink- the Link class from which the child object IDs are read.
-
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 classNode- 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:
Savein interfaceStreamInterface- Overrides:
Savein classNode- Parameters:
rkStream- the Stream where the child objects are stored.
-
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 classNode- Parameters:
rkVersion- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
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 classNode- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
SetLocalRotate
public void SetLocalRotate(Matrix3f kRotate)
-
-