[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 NavStatus FindPolys( NavmeshPoint start, float radius, NavmeshQueryFilter filter, uint[] resultPolyRefs, uint[] resultParentRefs, float[] resultCosts, out int resultCount )

Public Function FindPolys ( _ start As NavmeshPoint, _ radius As Single, _ filter As NavmeshQueryFilter, _ resultPolyRefs As UInteger(), _ resultParentRefs As UInteger(), _ resultCosts As Single(), _ <OutAttribute> ByRef resultCount As Integer _ ) As NavStatus

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

#### Parameters

- start
- NavmeshPoint

The center point to start from which to start the search. (Must be valid.)

- radius
- Single

The radius of the query circle.

- filter
- NavmeshQueryFilter

The filter to apply to the query.

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

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

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

The reference 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 center point to the polygon. [(cost) * resultCount] (Optional)

- resultCount
- Int32%

The number of polygons found.

#### Return Value

The NavStatus flags for the query.# Remarks

At least one result buffer must be provided.

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

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.

If a polygon is not found via the graph search, even if it intersects the search circle, it will not be included in the result. Example scenario:

polyA is the start polygon.

polyB shares an edge with polyA. (Is adjacent.)

polyC shares an edge with polyB, but not with polyA

Even if the search circle overlaps polyC, it will not be included in the result
unless polyB is also in the set.

The value of the center point is used as the start point for cost calculations. It is not projected onto the surface of the mesh, so its y-value will effect the costs.

Intersection tests occur in 2D. All polygons and the search circle are projected onto the xz-plane. So the y-value of the center point does not effect intersection tests.

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