Package com.openinventor.inventor
Class SoPrimitiveVertex
- java.lang.Object
-
- com.openinventor.inventor.Inventor
-
- com.openinventor.inventor.SoPrimitiveVertex
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SoPrimitiveVertex extends Inventor implements java.lang.Cloneable
Represents a vertex of a generated primitive. AnSoPrimitiveVertex
represents a vertex of a primitive (triangle, line segment, or point) that is being generated by anSoCallbackAction
. It contains an object-space point, normal, texture coordinates, material index, and refers an instance of anSoDetail
subclass. This detail may contain more information about the vertex, or may be NULL if there is no such info.Instances of
SoPrimitiveVertex
are typically created on the stack by shape classes while they are generating primitives. Anyone who wants to save them as return values fromSoCallbackAction
should probably make copies of them.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openinventor.inventor.Inventor
Inventor.ConstructorCommand
-
-
Field Summary
-
Fields inherited from class com.openinventor.inventor.Inventor
VERBOSE_LEVEL, ZeroHandle
-
-
Constructor Summary
Constructors Constructor Description SoPrimitiveVertex()
Default constructor.SoPrimitiveVertex(SoPrimitiveVertex pv)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
clone()
SoDetail
getDetail()
Returns the detail giving more information about the vertex.int
getMaterialIndex()
Returns the index into the current set of materials of the material active at the vertex.SbVec3f
getNormal()
Returns the normal in object space.SbVec3f
getPoint()
Returns the surface point in object space.SoPointDetail
getPointDetail()
Returns the point detail giving more information about the vertex.SbVec4f
getTextureCoords()
Returns the texture coordinates in object space.void
setValue(SoPrimitiveVertex copyFrom)
static SoPrimitiveVertex[]
toArray(long nativeArray, long length)
-
Methods inherited from class com.openinventor.inventor.Inventor
dispose, getNativeResourceHandle
-
-
-
-
Constructor Detail
-
SoPrimitiveVertex
public SoPrimitiveVertex()
Default constructor.
-
SoPrimitiveVertex
public SoPrimitiveVertex(SoPrimitiveVertex pv)
Constructor. Note that copying a primitive vertex copies the detail reference, and not the detail itself.
-
-
Method Detail
-
clone
public java.lang.Object clone()
-
setValue
public void setValue(SoPrimitiveVertex copyFrom)
-
toArray
public static SoPrimitiveVertex[] toArray(long nativeArray, long length)
-
getPoint
public SbVec3f getPoint()
Returns the surface point in object space.
-
getNormal
public SbVec3f getNormal()
Returns the normal in object space.
-
getTextureCoords
public SbVec4f getTextureCoords()
Returns the texture coordinates in object space.
-
getDetail
public SoDetail getDetail()
Returns the detail giving more information about the vertex. Note that the return value is NULL if there is no more info.
-
getPointDetail
public SoPointDetail getPointDetail()
Returns the point detail giving more information about the vertex. Note that the return value is NULL if there is no more info.
-
getMaterialIndex
public int getMaterialIndex()
Returns the index into the current set of materials of the material active at the vertex.
-
-