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

Polygon and neighbor data. [Length: >= polyCount * 2 * maxVertsPerPoly]

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


 C#  Visual Basic  Visual C++ 
public ushort[] polys
Public polys As UShort()
array<unsigned short>^ polys


Each entry is 2 * MaxVertsPerPoly in length.

The first half of the entry contains the indices of the polygon. The first instance of NullIndex indicates the end of the indices for the entry.

The second half contains indices to neighbor polygons. A value of NullIndex indicates no connection for the associated edge. (Solid wall.)


MaxVertsPerPoly = 6
For the entry: (1, 3, 4, 8, NullIndex, NullIndex, 18, NullIndex, 21, NullIndex, NullIndex, NullIndex)

(1, 3, 4, 8) defines a polygon with 4 vertices.
Edge 1->3 is shared with polygon 18.
Edge 4->8 is shared with polygon 21.
Edges 3->4 and 4->8 are border edges not shared with any other polygon.

See Also