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

Builds a contour set from the region outlines in the provided CompactHeightfield.

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 ContourSet Build(
	BuildContext context,
	CompactHeightfield field,
	float edgeMaxDeviation,
	int maxEdgeLength,
	ContourBuildFlags flags
)
Public Shared Function Build ( _
	context As BuildContext, _
	field As CompactHeightfield, _
	edgeMaxDeviation As Single, _
	maxEdgeLength As Integer, _
	flags As ContourBuildFlags _
) As ContourSet
public:
static ContourSet^ Build(
	BuildContext^ context, 
	CompactHeightfield^ field, 
	float edgeMaxDeviation, 
	int maxEdgeLength, 
	ContourBuildFlags flags
)

Parameters

context
BuildContext
The context to use for the build.
field
CompactHeightfield
The field to use for the build.(Must have region data.)
edgeMaxDeviation
Single
The maximum distance a simplified edge may deviate from the raw contour's vertices. [Limit: >= 0]
maxEdgeLength
Int32
The maximum allowed length of a simplified edge. [Limit: >= 0]
flags
ContourBuildFlags
The build flags.

Return Value

The contour set, or null on failure.

Remarks

The raw contours will match the region outlines exactly. The edgeMaxDeviation and maxEdgeLength parameters control how closely the simplified contours will match the raw contours.

Simplified contours are generated such that the vertices for portals between areas match up. (They are considered mandatory vertices.)

Setting maxEdgeLength to zero will disabled the feature.

See Also