Click or drag to resize
DigitalRuneTriangleMeshComputeNormals Method
Computes the mesh normals.

Namespace: DigitalRune.Geometry.Meshes
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.18.0.0 (1.18.2.14427)
Syntax
public Vector3F[] ComputeNormals(
	bool useWeightedAverage,
	float angleLimit
)

Parameters

useWeightedAverage
Type: SystemBoolean
If set to the influence of each triangle normal is weighted by the triangle area; otherwise, all triangle normals have the same weight.
angleLimit
Type: SystemSingle
The angle limit in radians. Normals are only merged if the angle between the triangle normals is equal to or less than the angle limit. Set this value to -1 to disable the angle limit (all normals of one vertex are merged).

Return Value

Type: Vector3F
If no angle limit is used (angle limit is -1), an array with one normal per vertex is returned. If an angle limit is used, an array with one normal per index is used.
Remarks
This method computes vertex normals by averaging the triangle normals.

Angle limit: The angleLimit can be used to keep sharp edges between triangles. If the angle limit is used, the returned array contains one entry per index (= 3 entries per triangle) because the normal of a vertex can have different direction for each neighbor triangle. If the angle limit is not used, the returned array contains one entry per vertex because the vertex normal of a single vertex is the same for all neighboring triangles.

See Also