Class SoSegmentChain
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.misc.SoBase
-
- com.openinventor.inventor.fields.SoFieldContainer
-
- com.openinventor.imageviz.nodes.geometries.SoSegmentChain
-
- All Implemented Interfaces:
SafeDisposable
public class SoSegmentChain extends SoFieldContainer
class that reprensents a chain of segments.- See Also:
SoFieldContainer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
Fields Modifier and Type Field Description SoMFInt32
sizes
Array containing the number connected vertices in each segment chain.SoMFVec3d
vertices
Ordered list of vertices used in all the segment chains.-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoSegmentChain()
Default constructor.
-
Method Summary
-
Methods inherited from class com.openinventor.inventor.fields.SoFieldContainer
copyFieldValues, copyFieldValues, enableNotify, fieldsAreEqual, get, getAllFields, getEventIn, getEventOut, getField, getFieldName, hasDefaultValues, isNotifyEnabled, set, setToDefaults
-
Methods inherited from class com.openinventor.inventor.misc.SoBase
dispose, getName, isDisposable, isSynchronizable, setName, setSynchronizable, touch
-
Methods inherited from class com.openinventor.inventor.Inventor
getNativeResourceHandle
-
-
-
-
Field Detail
-
sizes
public final SoMFInt32 sizes
Array containing the number connected vertices in each segment chain. The size of the array is the number of chains.A chain with n connected vertices has (n-1) segment. A chain cannot have less than 2 vertices.
-
vertices
public final SoMFVec3d vertices
Ordered list of vertices used in all the segment chains. Here is an example on how to iterate over each vertices of each chain.int indexAccumulator = 0; for (int chainIndex=0; chainIndex<sizes.getNum(); ++chainIndex) { for (int vertexIndex=0; vertexIndex<sizes[chainIndex]; ++vertexIndex) { fprintf(stdout,"chain %d - vertices %d = (%.3g %.3g %.3g)\n", chainIndex, vertexIndex, vertices[indexAccumulator+vertexIndex][0], vertices[indexAccumulator+vertexIndex][1], vertices[indexAccumulator+vertexIndex][2] ); } indexAccumulator += sizes[chainIndex]; }
-
-