Click or drag to resize
Ab4d.SharpEngine logo

MathUtilsCalculateNormal Method

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.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.0.9584+ba1aaa26d4181dd3fa8ed7b6398391d1affa36c8
Syntax
C#
public static Vector3 CalculateNormal(
	Vector3 p1,
	Vector3 p2,
	Vector3 p3
)

Parameters

p1  Vector3
first position
p2  Vector3
second position
p3  Vector3
third position

Return Value

Vector3
Vector3 that is a normal vector of the triangle defined by the three points p1, p2 and p3
See Also