class
MeshEx
Extension class for Mesh, for adding additional functionality for the script version of the class.
Public
Methods
staticCreate
Creates a new mesh with enough space to hold the a number of primitives using the specified layout.
All indices will be part of a single sub-mesh.
- numVertices
- Number of vertices in the mesh.
- numIndices
- Number of indices in the mesh. Must be a multiple of primitive size as specified by provided topology.
- topology
- Determines how should the provided indices be interpreted by the pipeline. Default option is a triangle list, where three indices represent a single triangle.
- flags
- Flags to control various mesh options.
- vertex
- Controls how are vertices organized in the vertex buffer and what data they contain.
- index
- Size of indices, use smaller size for better performance, however be careful not to go over the number of vertices limited by the data type size.
staticCreate
Creates a new mesh with enough space to hold the a number of primitives using the specified layout.
Indices can be referenced by multiple sub-meshes.
- numVertices
- Number of vertices in the mesh.
- numIndices
- Number of indices in the mesh. Must be a multiple of primitive size as specified by provided topology.
- subMeshes
- Defines how are indices separated into sub-meshes, and how are those sub-meshes rendered. Sub-meshes may be rendered independently, each with a different material.
- flags
- Flags to control various mesh options.
- vertex
- Controls how are vertices organized in the vertex buffer and what data they contain.
- index
- Size of indices, use smaller size for better performance, however be careful not to go over the number of vertices limited by the data type size.
staticCreate
Creates a new mesh from an existing mesh data.
Created mesh will match the vertex and index buffers described by the mesh data exactly. Mesh will have no sub-meshes.
- data
- Vertex and index data to initialize the mesh with.
- topology
- Determines how should the provided indices be interpreted by the pipeline. Default option is a triangle list, where three indices represent a single triangle.
- flags
- Flags to control various mesh options.
staticCreate
Creates a new mesh with enough space to hold the a number of primitives using the specified layout.
Indices can be referenced by multiple sub-meshes.
- data
- Vertex and index data to initialize the mesh with.
- subMeshes
- Defines how are indices separated into sub-meshes, and how are those sub-meshes rendered. Sub-meshes may be rendered independently, each with a different material.
- flags
- Flags to control various mesh options.
staticGetSubMeshes
Returns all sub-meshes contained in the mesh.
staticGetSubMeshCount
Returns the number of sub-meshes contained in this mesh.
staticGetBounds
staticGetMeshData
Accesses the vertex and index data of the mesh.
If reading, mesh must have been created with the MeshUsage::CPUCached flag. If writing the caller must ensure the data matches mesh's vertex/index counts, vertex layout and index format.