Class VertexFormat



  • public final class VertexFormat
    extends Object
    Defines the format of the vertices in a mesh. A vertex consists of an array of points, normals (optional), and texture coordinates.
    Since:
    JavaFX 8u40
    • Field Detail

      • POINT_TEXCOORD

        public static final VertexFormat POINT_TEXCOORD
        Specifies the format of a vertex that consists of a point and texture coordinates.
      • POINT_NORMAL_TEXCOORD

        public static final VertexFormat POINT_NORMAL_TEXCOORD
        Specifies the format of a vertex that consists of a point, normal and texture coordinates.
    • Method Detail

      • getVertexIndexSize

        public int getVertexIndexSize​()
        Returns the number of component indices that represents a vertex. For example, a POINT_TEXCOORD vertex consists of 2 indices, one for point component and the other for texture coordinates component. Hence its value will be 2.
        Returns:
        the number of component indices
      • getPointIndexOffset

        public int getPointIndexOffset​()
        Returns the index offset in the face array of the point component within a vertex.
        Returns:
        the offset to the point component.
      • getNormalIndexOffset

        public int getNormalIndexOffset​()
        Returns the index offset in the face array of the normal component within a vertex.
        Returns:
        the offset to the normal component.
      • getTexCoordIndexOffset

        public int getTexCoordIndexOffset​()
        Returns the index offset in the face array of the texture coordinates component within a vertex.
        Returns:
        the offset to the texture coordinates component.
      • toString

        public String toString​()
        Description copied from class: Object
        Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.

        The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:

         getClass().getName() + '@' + Integer.toHexString(hashCode())
         
        Overrides:
        toString in class Object
        Returns:
        a string representation of the object.