Package WildMagic.LibGraphics.Surfaces
Class TubeSurface
- java.lang.Object
-
- All Implemented Interfaces:
java.io.Serializable
,NameIdInterface
,StreamInterface
public class TubeSurface extends TriMesh 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 (package private) float[]
m_afCos
(package private) float[]
m_afSin
(package private) boolean
m_bClosed
(package private) boolean
m_bSampleByArcLength
(package private) int
m_iMedialSamples
(package private) int
m_iSliceSamples
(package private) Vector3f
m_kUpVector
(package private) float
m_oRadial
(package private) Curve3f
m_pkMedial
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 TubeSurface()
default constructor, streamingTubeSurface(Curve3f pkMedial, float oRadial, boolean bClosed, Vector3f rkUpVector, int iMedialSamples, int iSliceSamples, Attributes rkAttr, boolean bSampleByArcLength, boolean bInsideView, Vector2f pkUVMin, Vector2f pkUVMax)
Construction and destruction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
ComputeIndices(boolean bInsideView)
tessellation supportprivate void
ComputeNormals()
tessellation supportprivate void
ComputeSinCos()
tessellation supportprivate void
ComputeUVs(Vector2f rkUVMin, Vector2f rkUVMax)
tessellation supportprivate void
ComputeVertices()
tessellation support(package private) Curve3f
GetMedial()
member access(package private) float
GetRadial()
member access(package private) int
GetSliceSamples()
member accessvoid
GetTMaxSlice(Vector3f[] akSlice)
Generate vertices for the end slices.void
GetTMinSlice(Vector3f[] akSlice)
Generate vertices for the end slices.(package private) Vector3f
GetUpVector()
member access(package private) int
Index(int iS, int iM)
member access(package private) Curve3f
setMedial(Curve3f medial)
member access(package private) float
setRadial(float radial)
member accessvoid
UpdateSurface()
If the medial curve is modified, for example if it is control point based and the control points are modified, then you should call this update function to recompute the tube surface geometry.(package private) Vector3f
UpVector()
member access-
Methods inherited from class WildMagic.LibGraphics.SceneGraph.TriMesh
GetDiskUsed, GetTriangle, GetTriangleQuantity, Link, Load, Register, Save, SaveStrings
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface WildMagic.LibGraphics.ObjectSystem.StreamInterface
GetDiskUsed, Link, Load, Register, Save, SaveStrings
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_pkMedial
Curve3f m_pkMedial
-
m_oRadial
float m_oRadial
-
m_iMedialSamples
int m_iMedialSamples
-
m_iSliceSamples
int m_iSliceSamples
-
m_kUpVector
Vector3f m_kUpVector
-
m_afSin
float[] m_afSin
-
m_afCos
float[] m_afCos
-
m_bClosed
boolean m_bClosed
-
m_bSampleByArcLength
boolean m_bSampleByArcLength
-
-
Constructor Detail
-
TubeSurface
public TubeSurface()
default constructor, streaming
-
TubeSurface
public TubeSurface(Curve3f pkMedial, float oRadial, boolean bClosed, Vector3f rkUpVector, int iMedialSamples, int iSliceSamples, Attributes rkAttr, boolean bSampleByArcLength, boolean bInsideView, Vector2f pkUVMin, Vector2f pkUVMax)
Construction and destruction. If rkUpVector is not the zero vector, it will be used as 'up' in the frame calculations. If it is the zero vector, the Frenet frame will be used. If bWantColors is 'true', the vertex colors are allocated and set to black. The application needs to assign colors as needed. If either of pkUVMin or pkUVMax is not null, both must be not null. In this case, texture coordinates are generated for the surface.- Parameters:
pkMedial
-oRadial
-bClosed
-rkUpVector
- If rkUpVector is not the zero vector, it will be used as 'up' in the frame calculations. If it is the zero vector, the Frenet frame will be used.iMedialSamples
- control tessellationiSliceSamples
- control tessellationrkAttr
-bSampleByArcLength
-bInsideView
-pkUVMin
- if not null, generate texture coordinatespkUVMax
- if not null, generate texture coordinates
-
-
Method Detail
-
GetMedial
Curve3f GetMedial()
member access
-
GetRadial
float GetRadial()
member access
-
GetSliceSamples
int GetSliceSamples()
member access
-
GetUpVector
Vector3f GetUpVector()
member access
-
Index
int Index(int iS, int iM)
member access
-
setRadial
float setRadial(float radial)
member access
-
UpVector
Vector3f UpVector()
member access
-
GetTMaxSlice
public void GetTMaxSlice(Vector3f[] akSlice)
Generate vertices for the end slices. @see GetTMinSlice()- Parameters:
akSlice
- slice list
-
GetTMinSlice
public void GetTMinSlice(Vector3f[] akSlice)
Generate vertices for the end slices. These are useful when you build an open tube and want to attach meshes at the ends to close the tube. The input array must have size (at least) S+1 where S is the number returned by GetSliceSamples. Function GetTMinSlice is used to access the slice corresponding to the medial curve evaluated at its domain minimum, tmin. Function GetTMaxSlice accesses the slice for the domain maximum, tmax. If the curve is closed, the slices are the same.- Parameters:
akSlice
- slice list
-
UpdateSurface
public void UpdateSurface()
If the medial curve is modified, for example if it is control point based and the control points are modified, then you should call this update function to recompute the tube surface geometry.
-
ComputeIndices
private void ComputeIndices(boolean bInsideView)
tessellation support
-
ComputeNormals
private void ComputeNormals()
tessellation support
-
ComputeSinCos
private void ComputeSinCos()
tessellation support
-
ComputeVertices
private void ComputeVertices()
tessellation support
-
-