 |
MultiMaterialModelNodeAddSubMesh(Int32, Int32, Material, Material, String) Method |
AddSubMesh method adds a new
SubMesh that will render triangles with the specified start index and index count.
Note that index numbers are not triangle indexes but indexes in the IndexBuffer.
For example to set start location to the second triangle, set startIndexLocation to 3 (indices from 0 to 2 define the first triangle).
Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntaxpublic SubMesh AddSubMesh(
int startIndexLocation,
int indexCount,
Material? material = null,
Material? backMaterial = null,
string? subMeshName = null
)
Parameters
- startIndexLocation Int32
- Start index in IndexBuffer in the Mesh. Note that index numbers are not triangle indexes but indices in the IndexBuffer. For example to set start location to the second triangle, set StartIndexLocation to 3 (indices from 0 to 2 define the first triangle).
- indexCount Int32
- Number of triangle indices to render. For example, when set to 6, then 2 triangles will be rendered.
- material Material (Optional)
- optional material that used to render the front side of the triangles
- backMaterial Material (Optional)
- optional material that used to render the back side of the triangles
- subMeshName String (Optional)
- optional SubMesh name
Return Value
SubMeshCreated SubMesh
Remarks[Missing <remarks> documentation for "M:Ab4d.SharpEngine.SceneNodes.MultiMaterialModelNode.AddSubMesh(System.Int32,System.Int32,Ab4d.SharpEngine.Materials.Material,Ab4d.SharpEngine.Materials.Material,System.String)"]
See Also