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

Constructor.

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

Syntax

         
 C#  Visual Basic  Visual C++ 
public PathCorridor(
	int maxPathSize,
	int maxCorners,
	NavmeshQuery query,
	NavmeshQueryFilter filter
)
Public Sub New ( _
	maxPathSize As Integer, _
	maxCorners As Integer, _
	query As NavmeshQuery, _
	filter As NavmeshQueryFilter _
)
public:
PathCorridor(
	int maxPathSize, 
	int maxCorners, 
	NavmeshQuery^ query, 
	NavmeshQueryFilter^ filter
)

Parameters

maxPathSize
Int32
The maximum path size that can be handled by the object. [Limit: >= 1]
maxCorners
Int32
The maximum number of corners the corner buffer can hold. [Limit: >= 2]
query
NavmeshQuery
The query to be used by the corridor.
filter
NavmeshQueryFilter
The query filter to be used by the corridor.

Remarks

Important: The Reset(NavmeshPoint) method must be called before the corridor can be used. (That is how the position is set.)

Due to internal optimizations, the maximum number of detectable corners will be (maxCorners - 1).

The query and filter parameters can be set to null. This supports the ability to create pools of re-usable path corridor objects. But it means that care needs to be taken not to use the corridor until query and filter objects have been set. See ReleaseLocals(PathCorridor) and LoadLocals(PathCorridor, NavmeshPoint, NavmeshQuery, NavmeshQueryFilter) for pool related utility functions.

See Also