[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: 0.4.0.0 (0.4.0.0)

Syntax

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

Remarks

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.)

Example:

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