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

Returns the segments for the specified polygon, optionally excluding portals.

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,
	uint[] segmentPolyRefs,
	out int segmentCount
)
Public Function GetPolySegments ( _
	polyRef As UInteger, _
	filter As NavmeshQueryFilter, _
	resultSegments As Vector3(), _
	segmentPolyRefs As UInteger(), _
	<OutAttribute> ByRef segmentCount As Integer _
) As NavStatus
public:
NavStatus GetPolySegments(
	unsigned int polyRef, 
	NavmeshQueryFilter^ filter, 
	array<Vector3>^ resultSegments, 
	array<unsigned int>^ segmentPolyRefs, 
	[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 segments. [(vertA, vertB) * segmentCount]
segmentPolyRefs
array<UInt32>[]()[][]
Refernce ids of the each segment's neighbor polygon. Or zero if the segment is considered impassable. [(polyRef) * segmentCount] (Optional)
segmentCount
Int32%
The number of segments returned.

Return Value

The NavStatus flags for the query.

Remarks

If the segmentPolyRefs parameter is provided, then all polygon segments will be returned. If the parameter is null, then only the wall segments are returned.

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

The vertex and polyRef buffers must be sized for the maximum segments per polygon of the source navigation mesh. I.e. (2 * MaxAllowedVertsPerPoly)

See Also