Class SoCoordinateElement


  • public class SoCoordinateElement
    extends SoReplacedElement
    Stores the current coordinates. This element stores the current coordinates. Coordinates may be specified as 3-D or 4-D vectors. This element remembers the last type of value stored.

    This class allows read-only access to the top element in the state to make accessing several values in it more efficient. Individual values must be accessed through this instance.

    See Also:
    SoCoordinate3, SoCoordinate4, SoProjection, SoVertexProperty
    • Method Detail

      • set4

        public static void set4​(SoState state,
                                SoNode node,
                                SbVec4f[] coords)
        Sets the current coordinates in the state as 4-vectors.
      • get3

        public SbVec3f get3​(int index)
        Returns the indexed coordinate from an element as a 3-vector, converting if necessary. A returned reference may be invalid after the next call to this method or the get4() method.
      • getClassStackIndex

        @Deprecated(since="9.3.0.0")
        public static int getClassStackIndex()
        Deprecated.
        As of Open Inventor 9.3.0.0. replaced by SoElement.getClassStackIndex(Class)
        Returns the stack id for this element. ] *
      • set3

        public static void set3​(SoState state,
                                SoNode node,
                                SbVec3f[] coords)
        Sets the current coordinates in the state as 3-vectors.
      • getNum

        public int getNum()
        Returns the number of coordinate points in an instance.
      • getDefault3

        public static SbVec3f getDefault3()
        Returns the default 3-D coordinate.
      • getDefault4

        public static SbVec4f getDefault4()
        Returns the default 4-D coordinate.
      • get4

        public SbVec4f get4​(int index)
        Returns the indexed coordinate from an element as a 4-vector, converting if necessary. A returned reference may be invalid after the next call to this method or the get3() method.
      • is3D

        public boolean is3D()
        Returns true if the coordinates were specified as 3-vectors, false if 4-vectors.
      • getInstance

        public static SoCoordinateElement getInstance​(SoState state)
        Returns the top (current) instance of the element in the state.