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

Voxelizes the provided triangles into the heightfield.

Namespace: org.critterai.nmgen
Assembly: cai-nmgen (in cai-nmgen.dll) Version: 0.4.0.0 (0.4.0.0)

Syntax

         
 C#  Visual Basic  Visual C++ 
public bool AddTriangles(
	BuildContext context,
	Vector3[] verts,
	ushort[] tris,
	byte[] areas,
	int flagMergeThreshold
)
Public Function AddTriangles ( _
	context As BuildContext, _
	verts As Vector3(), _
	tris As UShort(), _
	areas As Byte(), _
	flagMergeThreshold As Integer _
) As Boolean
public:
bool AddTriangles(
	BuildContext^ context, 
	array<Vector3>^ verts, 
	array<unsigned short>^ tris, 
	array<unsigned char>^ areas, 
	int flagMergeThreshold
)

Parameters

context
BuildContext
The context to use for the operation
verts
array<Vector3>[]()[][]
The vertices. [Length: >= vertCount] (No buffering allowed.)
tris
array<UInt16>[]()[][]
The triangles. [(vertAIndex, vertBIndex, vertCIndex) * triCount]
areas
array<Byte>[]()[][]
The ids of the areas the triangles belong to. [Limit: <= MaxArea] [Size: >= triCount]
flagMergeThreshold
Int32
The distance where the walkable flag is favored over the non-walkable flag. [Limit: >= 0] [Normal: 1]

Return Value

True if the operation was successful.

Remarks

Unlike many other methods in the library, the arrays must be sized exactly to the content. If you need to pass buffers, use the method that takes a TriangleMesh object.

See Also