Class SoPrimitiveVertex

  • All Implemented Interfaces:
    java.lang.Cloneable

    public class SoPrimitiveVertex
    extends Inventor
    implements java.lang.Cloneable
    Represents a vertex of a generated primitive. An SoPrimitiveVertex represents a vertex of a primitive (triangle, line segment, or point) that is being generated by an SoCallbackAction. It contains an object-space point, normal, texture coordinates, material index, and refers an instance of an SoDetail 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 from SoCallbackAction should probably make copies of them.

    • 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()
      • 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.