Package WildMagic.LibGraphics.SceneGraph
Class Polyline
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.SceneGraph.Spatial
-
- WildMagic.LibGraphics.Rendering.Bindable
-
- WildMagic.LibGraphics.SceneGraph.Geometry
-
- WildMagic.LibGraphics.SceneGraph.Polyline
-
- All Implemented Interfaces:
java.io.Serializable
,NameIdInterface
,StreamInterface
public class Polyline extends Geometry 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 protected boolean
m_bClosed
polyline is open or closedprotected boolean
m_bContiguous
polyline is contiguous or disjoint segmentsprotected int
m_iActiveQuantity
Allow application to specify fewer than the maximum number of vertices to draw.private static long
serialVersionUID
-
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 Polyline()
Default constructor.Polyline(VertexBuffer pkVBuffer, boolean bClosed, boolean bContiguous)
construction
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
Copy(Polyline kSource)
constructionint
GetActiveQuantity()
Get the number of active points.boolean
GetClosed()
Get closed value.boolean
GetContiguous()
Get contiguous value.int
GetDiskUsed(StreamVersion rkVersion)
Returns the size of this object and it's children on disk for the current StreamVersion parameter.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 it's children to the Stream.StringTree
SaveStrings(java.lang.String acTitle)
Write this object into a StringTree for the scene-graph visualization.void
SetActiveQuantity(int iActiveQuantity)
Set the number of active points.void
SetClosed(boolean bClosed)
Set closed value.void
SetContiguous(boolean bContiguous)
Set contiguous value.protected void
SetGeometryType(boolean bInit)
Sets the geometric type based on the closed and contiguous values.-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.Geometry
Copy, dispose, GetAllObjectsByName, GetModelBound, GetObjectByID, GetObjectByName, GetVisibleSet, UpdateModelBound, UpdateModelNormals, 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
-
m_iActiveQuantity
protected int m_iActiveQuantity
Allow application to specify fewer than the maximum number of vertices to draw.
-
m_bClosed
protected boolean m_bClosed
polyline is open or closed
-
m_bContiguous
protected boolean m_bContiguous
polyline is contiguous or disjoint segments
-
-
Constructor Detail
-
Polyline
public Polyline(VertexBuffer pkVBuffer, boolean bClosed, boolean bContiguous)
construction- Parameters:
pkVBuffer
- VertexBuffer containing Polyline data.bClosed
- when true polyline is closed, when false polyline is open.bContiguous
- when true polyline is contiguous or when false polyline is disjoint segments
-
Polyline
public Polyline()
Default constructor.
-
-
Method Detail
-
Copy
public void Copy(Polyline kSource)
construction- Parameters:
pkVBuffer
- VertexBuffer containing Polyline data.bClosed
- when true polyline is closed, when false polyline is open.bContiguous
- when true polyline is contiguous or when false polyline is disjoint segments
-
GetActiveQuantity
public final int GetActiveQuantity()
Get the number of active points.- Returns:
- the number of active points.
-
GetClosed
public final boolean GetClosed()
Get closed value.- Returns:
- polyline closed value.
-
GetContiguous
public final boolean GetContiguous()
Get contiguous value.- Returns:
- polyline contiguous value.
-
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:
GetDiskUsed
in interfaceStreamInterface
- Overrides:
GetDiskUsed
in classGeometry
- 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:
Link
in interfaceStreamInterface
- Overrides:
Link
in classGeometry
- 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:
Load
in interfaceStreamInterface
- Overrides:
Load
in classGeometry
- 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:
Register
in interfaceStreamInterface
- Overrides:
Register
in classGeometry
- 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:
Save
in interfaceStreamInterface
- Overrides:
Save
in classGeometry
- 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:
SaveStrings
in interfaceStreamInterface
- Overrides:
SaveStrings
in classGeometry
- Parameters:
acTitle
- the header for this object in the StringTree.- Returns:
- StringTree containing a String-based representation of this object and it's children.
-
SetActiveQuantity
public void SetActiveQuantity(int iActiveQuantity)
Set the number of active points.- Parameters:
iActiveQuantity
- the number of active points.
-
SetClosed
public void SetClosed(boolean bClosed)
Set closed value.- Parameters:
bClosed
- polyline closed value.
-
SetContiguous
public void SetContiguous(boolean bContiguous)
Set contiguous value.- Parameters:
bContiguous
- polyline contiguous value.
-
SetGeometryType
protected void SetGeometryType(boolean bInit)
Sets the geometric type based on the closed and contiguous values.- Parameters:
bInit
- when true the function is called from the Constructor, so do not increment/decrement index quantity.
-
-