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

Builds a detail mesh from the provided polygon mesh.

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 static PolyMeshDetail Build(
	BuildContext context,
	PolyMesh polyMesh,
	CompactHeightfield field,
	float detailSampleDistance,
	float detailMaxDeviation
)
Public Shared Function Build ( _
	context As BuildContext, _
	polyMesh As PolyMesh, _
	field As CompactHeightfield, _
	detailSampleDistance As Single, _
	detailMaxDeviation As Single _
) As PolyMeshDetail
public:
static PolyMeshDetail^ Build(
	BuildContext^ context, 
	PolyMesh^ polyMesh, 
	CompactHeightfield^ field, 
	float detailSampleDistance, 
	float detailMaxDeviation
)

Parameters

context
BuildContext
The context to use for the operation.
polyMesh
PolyMesh
The source polygon mesh.
field
CompactHeightfield
The compact heightfield used to build the polygon mesh.
detailSampleDistance
Single
The sample distance to use when sampling the surface height of the polygon mesh.
detailMaxDeviation
Single
The maximum the surface of the detail mesh should deviate from the heightfield data.

Return Value

A new detail mesh, or null on error.

See Also