Class GltfScene.Primitive

java.lang.Object
com.codename1.gpu.GltfScene.Primitive
Enclosing class:
GltfScene

public static final class GltfScene.Primitive extends Object
One triangle primitive, with its vertex data in the node's local space.
  • Method Details

    • getNode

      public int getNode()
      The node that places this primitive.
    • getMaterial

      public int getMaterial()
      The material index, or -1.
    • getVertexCount

      public int getVertexCount()
      The number of vertices.
    • getPositions

      public float[] getPositions()
      x, y, z per vertex.
    • getNormals

      public float[] getNormals()
      x, y, z per vertex; computed flat normals when the file has none.
    • getTexcoords

      public float[] getTexcoords()
      u, v per vertex, or null.
    • getIndices

      public int[] getIndices()
      Triangle indices.
    • getJoints

      public int[] getJoints()
      Four joint indices per vertex (indices into the skin's joint list), or null when the primitive is not skinned.
    • getWeights

      public float[] getWeights()
      Four weights per vertex, or null when the primitive is not skinned.
    • isSkinned

      public boolean isSkinned()
      True when the primitive carries joints and weights.