Triangle | |
The TriangleModelNode type exposes the following members.
| Name | Description | |
|---|---|---|
| CalculateNormal | CalculateNormal returns a Vector3 that is a normal vector of the triangle defined by the three points p1, p2 and p3. The normal vector is calculated as a cross product of (p2 - p1) and (p3 - p1) and then normalized. | |
| CreateFromMesh | 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. | |
| UpdateFromMesh | UpdateFromMesh updates the 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. | |
| UpdateMesh |
UpdateMesh method recreates the mesh based on the current object properties.
The method should be overriden in the derived class that provides its own mesh generation.
(Overrides ModelNodeUpdateMesh) |