Click or drag to resize
Ab4d.SharpEngine logo

MeshUtilsCalculateNormals(Vector3, Int32, Int32, Int32, Boolean) Method

CalculateNormals method calculates normals for the specified positions and and triangle indices arrays.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public static Vector3[] CalculateNormals(
	Vector3[] positions,
	int[] indices,
	int startTriangleIndex,
	int indicesCount,
	bool normalize = true
)

Parameters

positions  Vector3
array of Vector3 that represents positions
indices  Int32
array of integers that represents triangle indices
startTriangleIndex  Int32
index of the first triangle index to process (note that this is not triangle index but index in the indices array so the startTriangleIndex for the second triangle is 3)
indicesCount  Int32
number of triangle indices to process (to get indicesCount from the number of triangles multiply the number of triangle by 3)
normalize  Boolean  (Optional)
when true (by default), then the normals are normalized

Return Value

Vector3

[Missing <returns> documentation for "M:Ab4d.SharpEngine.Utilities.MeshUtils.CalculateNormals(System.Numerics.Vector3[],System.Int32[],System.Int32,System.Int32,System.Boolean)"]

See Also