Click or drag to resize
Ab4d.SharpEngine logo

TriangleModelNode Methods

The TriangleModelNode type exposes the following members.

Methods
 NameDescription
Public methodStatic memberCalculateNormal 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.
Public methodStatic memberCreateFromMesh 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.
Public methodUpdateFromMesh 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.
Protected methodUpdateMesh 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)
Top
See Also