[This is preliminary documentation and is subject to change.]

Returns the normal for the triangle. (Costly method!)

Namespace: org.critterai.geom
Assembly: cai-util (in cai-util.dll) Version: 0.5.0.0 (0.5.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public static Vector3 GetNormal(
	Vector3[] vertices,
	int triangle
)
Public Shared Function GetNormal ( _
	vertices As Vector3(), _
	triangle As Integer _
) As Vector3
public:
static Vector3 GetNormal(
	array<Vector3>^ vertices, 
	int triangle
)

Parameters

vertices
array<Vector3>[]()[][]
An array of vertices which contains a representation of triangles. The wrap direction is expected to be clockwise.
triangle
Int32
The index of the first vertex in the triangle.

Return Value

The normal of the triangle.

Remarks

The normal of a triangle is the vector perpendicular to the triangle's plane with the direction determined by the right-handed rule.

See Also