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

**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 Function FindPolys ( _ startPolyRef As UInteger, _ vertices As Vector3(), _ filter As NavmeshQueryFilter, _ resultPolyRefs As UInteger(), _ resultParentRefs As UInteger(), _ resultCosts As Single(), _ <OutAttribute> ByRef resultCount As Integer _ ) As NavStatus

public: NavStatus FindPolys( unsigned int startPolyRef, array<Vector3>^ vertices, NavmeshQueryFilter^ filter, array<unsigned int>^ resultPolyRefs, array<unsigned int>^ resultParentRefs, array<float>^ resultCosts, [OutAttribute] int% resultCount )

#### Parameters

- startPolyRef
- UInt32

The reference of the polygon to start the search at.

- vertices
- array<Vector3>[]()[][]

The vertices of the convex polygon. [Length: vertCount]

- filter
- NavmeshQueryFilter

The filter to apply to the query.

- resultPolyRefs
- array<UInt32>[]()[][]

The references of the polygons touched by the search polygon. [(polyRef) * resultCount] (Optional)

- resultParentRefs
- array<UInt32>[]()[][]

The references of the parent polygons for each result. Zero if a result polygon has no parent. [(parentRef) * resultCount] (Optional)

- resultCosts
- array<Single>[]()[][]

The search cost from the centroid point to the polygon. [(cost) * resultCount] (Optional)

- resultCount
- Int32%

The number of polygons found.

#### Return Value

The NavStatus flags for the query.# Remarks

The order of the result is from least to highest cost.

At least one result buffer must be provided.

The primary use case for this method is for performing Dijkstra searches. Candidate polygons are found by searching the graph beginning at the start polygon.

The same intersection test restrictions that apply to the circle version of this method apply to this method.

The 3D centroid of the polygon is used as the start position for cost calculations.

Intersection tests occur in 2D. All polygons are projected onto the xz-plane, so the y-values of the vertices do not effect intersection tests.

If the buffers are is too small to hold the entire result, they will be filled to capacity.