Click or drag to resize
Ab4d.SharpEngine logo

MeshUtilsCalculateNormals(PositionNormalTextureVertex, Int32, Int32, Int32) Method

CalculateNormals method calculates normals for the specified vertexBuffer (PositionNormalTexture array) and triangle indices array. Normal values are written to the vertexBuffer. Normals are always normalized.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.2.9386+3a404a3e1ebfa4efd231da7fe6f10dfb23b95dc4
Syntax
C#
public static void CalculateNormals(
	PositionNormalTextureVertex[] vertexBuffer,
	int[] indices,
	int startTriangleIndex,
	int indicesCount
)

Parameters

vertexBuffer  PositionNormalTextureVertex
array of PositionNormalTexture that represents a vertex buffer
indices  Int32
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)
Remarks

[Missing <remarks> documentation for "M:Ab4d.SharpEngine.Utilities.MeshUtils.CalculateNormals(Ab4d.SharpEngine.Common.PositionNormalTextureVertex[],System.Int32[],System.Int32,System.Int32)"]

See Also