Package WildMagic.LibGraphics.SceneGraph
Class TriMesh
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable,NameIdInterface,StreamInterface
- Direct Known Subclasses:
ClodMesh,HierarchicalTriMesh,TubeSurface
public class TriMesh extends Triangles implements StreamInterface, java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class WildMagic.LibGraphics.SceneGraph.Geometry
Geometry.GeometryType
-
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 private static longserialVersionUID-
Fields inherited from class WildMagic.LibGraphics.SceneGraph.Geometry
HWorld, IBuffer, m_spkLEffect, ModelBound, States, Type, VBuffer
-
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 Constructor Description TriMesh()Default constructor.TriMesh(TriMesh kMesh)Construction.TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer)Construction.TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, boolean bUpdate)TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, BoundingVolume kBounds)Construction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intGetDiskUsed(StreamVersion rkVersion)Returns the size of this object and it's children on disk for the current StreamVersion parameter.booleanGetTriangle(int i, int[] riV)Get triangl at the specified index.intGetTriangleQuantity()Interpretation of the index buffer data.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.-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.Triangles
GetModelTriangle, GetWorldTriangle, SetInside, UpdateModelNormals
-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.Geometry
Copy, dispose, GetAllObjectsByName, GetModelBound, GetObjectByID, GetObjectByName, GetVisibleSet, UpdateModelBound, UpdateMS, UpdateMS, UpdateState, UpdateWorldBound, UpdateWorldData
-
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
-
-
Constructor Detail
-
TriMesh
public TriMesh()
Default constructor.
-
TriMesh
public TriMesh(TriMesh kMesh)
Construction.- Parameters:
pkVBuffer- vertex buffer.pkIBuffer- index buffer.
-
TriMesh
public TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer)
Construction.- Parameters:
pkVBuffer- vertex buffer.pkIBuffer- index buffer.
-
TriMesh
public TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, boolean bUpdate)
-
TriMesh
public TriMesh(VertexBuffer pkVBuffer, IndexBuffer pkIBuffer, BoundingVolume kBounds)
Construction.- Parameters:
pkVBuffer- vertex buffer.pkIBuffer- index buffer.
-
-
Method Detail
-
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 classTriangles- Parameters:
rkVersion- the current version of the Stream file being created.- Returns:
- the size of this object on disk.
-
GetTriangle
public boolean GetTriangle(int i, int[] riV)Get triangl at the specified index.- Specified by:
GetTrianglein classTriangles- Parameters:
i- index.rkV- int[3] array to contain the three triangle index values.
-
GetTriangleQuantity
public final int GetTriangleQuantity()
Interpretation of the index buffer data.- Specified by:
GetTriangleQuantityin classTriangles- Returns:
- number of triangles.
-
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 classTriangles- 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 classTriangles- 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 classTriangles- 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 classTriangles- 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 classTriangles- Parameters:
acTitle- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
-