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

Returns the wall segments for the specified polygon.

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 NavStatus GetPolySegments(
	uint polyRef,
	NavmeshQueryFilter filter,
	Vector3[] resultSegments,
	out int segmentCount
)
Public Function GetPolySegments ( _
	polyRef As UInteger, _
	filter As NavmeshQueryFilter, _
	resultSegments As Vector3(), _
	<OutAttribute> ByRef segmentCount As Integer _
) As NavStatus
public:
NavStatus GetPolySegments(
	unsigned int polyRef, 
	NavmeshQueryFilter^ filter, 
	array<Vector3>^ resultSegments, 
	[OutAttribute] int% segmentCount
)

Parameters

polyRef
UInt32
The polygon reference.
filter
NavmeshQueryFilter
The filter to apply to the query.
resultSegments
array<Vector3>[]()[][]
The segment vertex buffer for all walls. [(vertA, vertB) * segmentCount]
segmentCount
Int32%
The number of segments returned in the segments array.

Return Value

The NavStatus flags for the query.

Remarks

A segment that is normally a portal will be included in the result if the filter results in the neighbor polygon being considered impassable.

The vertex buffer must be sized for the maximum segments per polygon of the source navigation mesh. I.e: 2 * MaxAllowedVertsPerPoly

The segments can be used for simple 2D collision detection.

See Also