 |
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: 5.0.1075+bc537c8d217949260b11f66ee86aefa6456ac517
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