Class GltfScene.Primitive
java.lang.Object
com.codename1.gpu.GltfScene.Primitive
- Enclosing class:
GltfScene
One triangle primitive, with its vertex data in the node's local space.
-
Method Summary
Modifier and TypeMethodDescriptionint[]Triangle indices.int[]Four joint indices per vertex (indices into the skin's joint list), or null when the primitive is not skinned.intThe material index, or -1.intgetNode()The node that places this primitive.float[]x, y, zper vertex; computed flat normals when the file has none.float[]x, y, zper vertex.float[]u, vper vertex, or null.intThe number of vertices.float[]Four weights per vertex, or null when the primitive is not skinned.booleanTrue when the primitive carries joints and weights.
-
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, zper vertex. -
getNormals
public float[] getNormals()x, y, zper vertex; computed flat normals when the file has none. -
getTexcoords
public float[] getTexcoords()u, vper 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.
-