 |
TriangleModelNodeCreateFromMesh Method |
Creates a TriangleModelNode from a single triangle from the specified mesh.
The triangle is specified by the triangle index (triangleIndex) that is multiplied by 3 to get the vertex indices of the triangle.
The vertex indices are then used to get the positions and texture coordinates of the triangle vertices.
Namespace: Ab4d.SharpEngine.SceneNodesAssembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntaxpublic static TriangleModelNode CreateFromMesh(
Mesh mesh,
int triangleIndex,
Material material,
string? name = null
)
Parameters
- mesh Mesh
- mesh
- triangleIndex Int32
- index of the triangle (not index from TriangleIndices array)
- material Material
- material
- name String (Optional)
- optional name
Return Value
TriangleModelNodeTriangleModelNode
See Also