Class ModelInstanceDef


  • public final class ModelInstanceDef
    extends Table
    • Constructor Detail

      • ModelInstanceDef

        public ModelInstanceDef()
    • Method Detail

      • getRootAsModelInstanceDef

        public static ModelInstanceDef getRootAsModelInstanceDef​(java.nio.ByteBuffer _bb)
      • __init

        public void __init​(int _i,
                           java.nio.ByteBuffer _bb)
      • __assign

        public ModelInstanceDef __assign​(int _i,
                                         java.nio.ByteBuffer _bb)
      • vertexData

        public int vertexData​(int j)
        The "raw" vertex data stored as a byte array.
      • vertexDataLength

        public int vertexDataLength()
      • vertexDataAsByteBuffer

        public java.nio.ByteBuffer vertexDataAsByteBuffer()
      • vertexDataInByteBuffer

        public java.nio.ByteBuffer vertexDataInByteBuffer​(java.nio.ByteBuffer _bb)
      • indices16

        public int indices16​(int j)
        Indices into the vertex data. Will either be an array of 16-bit or 32-bit values.
      • indices16Length

        public int indices16Length()
      • indices16AsByteBuffer

        public java.nio.ByteBuffer indices16AsByteBuffer()
      • indices16InByteBuffer

        public java.nio.ByteBuffer indices16InByteBuffer​(java.nio.ByteBuffer _bb)
      • indices32

        public long indices32​(int j)
      • indices32Length

        public int indices32Length()
      • indices32AsByteBuffer

        public java.nio.ByteBuffer indices32AsByteBuffer()
      • indices32InByteBuffer

        public java.nio.ByteBuffer indices32InByteBuffer​(java.nio.ByteBuffer _bb)
      • ranges

        public ModelIndexRange ranges​(int j)
        The range of indices for each submesh.
      • rangesLength

        public int rangesLength()
      • materials

        public MaterialDef materials​(int j)
        The material describing the "look" of each submesh.
      • materialsLength

        public int materialsLength()
      • vertexAttributes

        public VertexAttribute vertexAttributes​(int j)
        Describes the structure of the vertex data, effectively the VertexFormat.
      • vertexAttributesLength

        public int vertexAttributesLength()
      • numVertices

        public long numVertices()
        The total number of vertices stored in the vertex data.
      • interleaved

        public boolean interleaved()
        Whether or not the attributes in the vertex data are interleaved.
      • shaderToMeshBones

        public int shaderToMeshBones​(int j)
        Maps the skeleton bone index to the shader bone index. The shader bones are only the bones that have at least one vertex weighted to them and, as such, are a subset of all the bones in the skeleton.
      • shaderToMeshBonesLength

        public int shaderToMeshBonesLength()
      • shaderToMeshBonesAsByteBuffer

        public java.nio.ByteBuffer shaderToMeshBonesAsByteBuffer()
      • shaderToMeshBonesInByteBuffer

        public java.nio.ByteBuffer shaderToMeshBonesInByteBuffer​(java.nio.ByteBuffer _bb)
      • blendShapes

        public BlendShape blendShapes​(int j)
        A collection of blendshapes, if they exist.
      • blendShapesLength

        public int blendShapesLength()
      • blendAttributes

        public VertexAttribute blendAttributes​(int j)
        Describes the structure of the vertex data for the blend shapes.
      • blendAttributesLength

        public int blendAttributesLength()
      • aabbs

        public SubmeshAabb aabbs​(int j)
        A bounding Aabb for each submesh.
      • aabbsLength

        public int aabbsLength()
      • createModelInstanceDef

        public static int createModelInstanceDef​(FlatBufferBuilder builder,
                                                 int vertex_dataOffset,
                                                 int indices16Offset,
                                                 int indices32Offset,
                                                 int rangesOffset,
                                                 int materialsOffset,
                                                 int vertex_attributesOffset,
                                                 long num_vertices,
                                                 boolean interleaved,
                                                 int shader_to_mesh_bonesOffset,
                                                 int blend_shapesOffset,
                                                 int blend_attributesOffset,
                                                 int aabbsOffset)
      • startModelInstanceDef

        public static void startModelInstanceDef​(FlatBufferBuilder builder)
      • addVertexData

        public static void addVertexData​(FlatBufferBuilder builder,
                                         int vertexDataOffset)
      • createVertexDataVector

        public static int createVertexDataVector​(FlatBufferBuilder builder,
                                                 byte[] data)
      • createVertexDataVector

        public static int createVertexDataVector​(FlatBufferBuilder builder,
                                                 java.nio.ByteBuffer data)
      • startVertexDataVector

        public static void startVertexDataVector​(FlatBufferBuilder builder,
                                                 int numElems)
      • addIndices16

        public static void addIndices16​(FlatBufferBuilder builder,
                                        int indices16Offset)
      • createIndices16Vector

        public static int createIndices16Vector​(FlatBufferBuilder builder,
                                                short[] data)
      • startIndices16Vector

        public static void startIndices16Vector​(FlatBufferBuilder builder,
                                                int numElems)
      • addIndices32

        public static void addIndices32​(FlatBufferBuilder builder,
                                        int indices32Offset)
      • createIndices32Vector

        public static int createIndices32Vector​(FlatBufferBuilder builder,
                                                int[] data)
      • startIndices32Vector

        public static void startIndices32Vector​(FlatBufferBuilder builder,
                                                int numElems)
      • addRanges

        public static void addRanges​(FlatBufferBuilder builder,
                                     int rangesOffset)
      • startRangesVector

        public static void startRangesVector​(FlatBufferBuilder builder,
                                             int numElems)
      • addMaterials

        public static void addMaterials​(FlatBufferBuilder builder,
                                        int materialsOffset)
      • createMaterialsVector

        public static int createMaterialsVector​(FlatBufferBuilder builder,
                                                int[] data)
      • startMaterialsVector

        public static void startMaterialsVector​(FlatBufferBuilder builder,
                                                int numElems)
      • addVertexAttributes

        public static void addVertexAttributes​(FlatBufferBuilder builder,
                                               int vertexAttributesOffset)
      • startVertexAttributesVector

        public static void startVertexAttributesVector​(FlatBufferBuilder builder,
                                                       int numElems)
      • addNumVertices

        public static void addNumVertices​(FlatBufferBuilder builder,
                                          long numVertices)
      • addInterleaved

        public static void addInterleaved​(FlatBufferBuilder builder,
                                          boolean interleaved)
      • addShaderToMeshBones

        public static void addShaderToMeshBones​(FlatBufferBuilder builder,
                                                int shaderToMeshBonesOffset)
      • createShaderToMeshBonesVector

        public static int createShaderToMeshBonesVector​(FlatBufferBuilder builder,
                                                        byte[] data)
      • createShaderToMeshBonesVector

        public static int createShaderToMeshBonesVector​(FlatBufferBuilder builder,
                                                        java.nio.ByteBuffer data)
      • startShaderToMeshBonesVector

        public static void startShaderToMeshBonesVector​(FlatBufferBuilder builder,
                                                        int numElems)
      • addBlendShapes

        public static void addBlendShapes​(FlatBufferBuilder builder,
                                          int blendShapesOffset)
      • createBlendShapesVector

        public static int createBlendShapesVector​(FlatBufferBuilder builder,
                                                  int[] data)
      • startBlendShapesVector

        public static void startBlendShapesVector​(FlatBufferBuilder builder,
                                                  int numElems)
      • addBlendAttributes

        public static void addBlendAttributes​(FlatBufferBuilder builder,
                                              int blendAttributesOffset)
      • startBlendAttributesVector

        public static void startBlendAttributesVector​(FlatBufferBuilder builder,
                                                      int numElems)
      • addAabbs

        public static void addAabbs​(FlatBufferBuilder builder,
                                    int aabbsOffset)
      • createAabbsVector

        public static int createAabbsVector​(FlatBufferBuilder builder,
                                            int[] data)
      • startAabbsVector

        public static void startAabbsVector​(FlatBufferBuilder builder,
                                            int numElems)
      • endModelInstanceDef

        public static int endModelInstanceDef​(FlatBufferBuilder builder)