Package WildMagic.LibGraphics.SceneGraph
Class Geometry
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.SceneGraph.Spatial
-
- WildMagic.LibGraphics.Rendering.Bindable
-
- WildMagic.LibGraphics.SceneGraph.Geometry
-
- All Implemented Interfaces:
java.io.Serializable,NameIdInterface,StreamInterface
public abstract class Geometry extends Bindable implements NameIdInterface, StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGeometry.GeometryTypeType of geometry:-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.Rendering.Bindable
Bindable.Info
-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.SceneGraph.Spatial
Spatial.CullingMode
-
-
Field Summary
Fields Modifier and Type Field Description Matrix4fHWorldhomogeneous world matrixIndexBufferIBuffermember access: IndexBufferprotected LightingEffectm_spkLEffectDynamic lighting.BoundingVolumeModelBoundmember access: BoundingVolumeprivate static longserialVersionUIDGlobalState[]StatesRender state and lights in path to this object.Geometry.GeometryTypeTypeType of geometry:VertexBufferVBuffermember access: VertexBuffer-
Fields inherited from class WildMagic.LibGraphics.Rendering.Bindable
m_bShared, m_kInfoArray
-
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 Modifier Constructor Description Geometry()Default constructor, creates a SphereBV bounding volume.protectedGeometry(Geometry kG)Constructor, creates a SphereBV bounding volume.protectedGeometry(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer)Constructor, creates a SphereBV bounding volume.protectedGeometry(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, BoundingVolume kBounds)Constructor, creates a SphereBV bounding volume.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidCopy(Geometry kG)Constructor, creates a SphereBV bounding volume.voiddispose()Delete memory.voidGetAllObjectsByName(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.BoundingVolumeGetModelBound()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.protected voidGetVisibleSet(Culler rkCuller, boolean bNoCull)cullingvoidLink(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.protected voidUpdateModelBound()geometric updatesprotected voidUpdateModelNormals()geometric updatesvoidUpdateMS()geometric updatesvoidUpdateMS(boolean bUpdateNormals)geometric updatesprotected voidUpdateState(java.util.Vector<java.util.Vector<GlobalState>> akGStack, java.util.Vector<Light> pkLStack)render state updatesprotected voidUpdateWorldBound()geometric updatesvoidUpdateWorldData(double dAppTime)internal use Compute the homogeneous world matrix from the components of the World transformation.-
Methods inherited from class WildMagic.LibGraphics.Rendering.Bindable
GetIdentifier, GetIdentifier, GetInfoQuantity, GetShared, IsReload, IsReload, OnLoad, OnRelease, Release, Reload, Reload, Remove, SetShared
-
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
-
VBuffer
public VertexBuffer VBuffer
member access: VertexBuffer
-
IBuffer
public IndexBuffer IBuffer
member access: IndexBuffer
-
ModelBound
public BoundingVolume ModelBound
member access: BoundingVolume
-
m_spkLEffect
protected LightingEffect m_spkLEffect
Dynamic lighting. The effect is pushed onto the front of Spatial's effect array so that lighting occurs before other shader effects.
-
Type
public Geometry.GeometryType Type
Type of geometry:
-
States
public GlobalState[] States
Render state and lights in path to this object. An attached effect provides additional render state, lights, and any other information needed to draw the object.
-
HWorld
public Matrix4f HWorld
homogeneous world matrix
-
-
Constructor Detail
-
Geometry
public Geometry()
Default constructor, creates a SphereBV bounding volume.
-
Geometry
protected Geometry(Geometry kG)
Constructor, creates a SphereBV bounding volume.- Parameters:
pkVBuffer- VertexBufferpkIBuffer- IndexBuffer
-
Geometry
protected Geometry(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer)
Constructor, creates a SphereBV bounding volume.- Parameters:
pkVBuffer- VertexBufferpkIBuffer- IndexBuffer
-
Geometry
protected Geometry(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, BoundingVolume kBounds)
Constructor, creates a SphereBV bounding volume.- Parameters:
pkVBuffer- VertexBufferpkIBuffer- IndexBuffer
-
-
Method Detail
-
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 classSpatial- Parameters:
rkName- the name of the objects to return.rkObjects- a Vector of all objects with the matching name.
-
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 classSpatial- Parameters:
rkVersion- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetModelBound
public BoundingVolume GetModelBound()
-
GetObjectByID
public GraphicsObject GetObjectByID(int uiID)
Returns the GraphicsObject with the ID that matches the input parameter, uiID.- Specified by:
GetObjectByIDin interfaceNameIdInterface- Overrides:
GetObjectByIDin classSpatial- Parameters:
uiID- the ID of the object to return.- Returns:
- the GraphicsObject that matches the input name.
-
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 classSpatial- Parameters:
rkName- the name of the object to return.- Returns:
- the GraphicsObject that matches the input name.
-
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 classSpatial- 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 classSpatial- 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 classSpatial- 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 classSpatial- 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 classSpatial- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
UpdateMS
public void UpdateMS()
geometric updates
-
UpdateMS
public void UpdateMS(boolean bUpdateNormals)
geometric updates- Parameters:
bUpdateNormals- if true call UpdateModelNormals().
-
UpdateWorldData
public void UpdateWorldData(double dAppTime)
internal use Compute the homogeneous world matrix from the components of the World transformation.- Overrides:
UpdateWorldDatain classSpatial- Parameters:
dAppTime- animation time step from the application.
-
Copy
protected void Copy(Geometry kG)
Constructor, creates a SphereBV bounding volume.- Parameters:
pkVBuffer- VertexBufferpkIBuffer- IndexBuffer
-
GetVisibleSet
protected void GetVisibleSet(Culler rkCuller, boolean bNoCull)
culling- Overrides:
GetVisibleSetin classBindable- Parameters:
rkCuller- culling object applied to this geometry.bNoCull- (not currently used).
-
UpdateModelBound
protected void UpdateModelBound()
geometric updates
-
UpdateModelNormals
protected void UpdateModelNormals()
geometric updates
-
UpdateState
protected void UpdateState(java.util.Vector<java.util.Vector<GlobalState>> akGStack, java.util.Vector<Light> pkLStack)
render state updates- Overrides:
UpdateStatein classBindable- Parameters:
akGStack- global states.akLStack- lights.
-
UpdateWorldBound
protected void UpdateWorldBound()
geometric updates- Overrides:
UpdateWorldBoundin classBindable
-
-