Recast Navigation  1.0.35
dtPoly Struct Reference

Defines a polyogn within a dtMeshTile object. More...

#include <DetourNavMesh.h>

Public Member Functions

void setPolyType (unsigned char t)
 Sets the polygon type. (See: dtPolyTypes.) More...
 
unsigned char getPolyType () const
 Gets the polygon type. (See: dtPolyTypes) More...
 
void setTeamCost (dtTeam team, float cost)
 Sets the polygon type. (See: dtPolyTypes.) More...
 
float getTeamCost (dtTeam team) const
 Gets the polygon type. (See: dtPolyTypes) More...
 

Public Attributes

unsigned int firstLink
 Index to first link in linked list. (Or DT_NULL_LINK if there is no link.) More...
 
unsigned short verts [DT_VERTS_PER_POLYGON]
 The indices of the polygon's vertices. More...
 
unsigned short neis [DT_VERTS_PER_POLYGON]
 Packed data representing neighbor polygons references and flags for each edge. More...
 
navAreaMask areaMask
 The user defined polygon flags. More...
 
unsigned char vertCount
 The number of vertices in the polygon. More...
 
unsigned char polyType
 The bit packed area id and polygon type. More...
 
float teamCost [DT_MAX_TEAMS]
 

Description

Defines a polyogn within a dtMeshTile object.

Member Function Documentation

unsigned char dtPoly::getPolyType ( ) const
inline

Gets the polygon type. (See: dtPolyTypes)

float dtPoly::getTeamCost ( dtTeam  team) const
inline

Gets the polygon type. (See: dtPolyTypes)

void dtPoly::setPolyType ( unsigned char  t)
inline

Sets the polygon type. (See: dtPolyTypes.)

void dtPoly::setTeamCost ( dtTeam  team,
float  cost 
)
inline

Sets the polygon type. (See: dtPolyTypes.)

Member Data Documentation

navAreaMask dtPoly::areaMask

The user defined polygon flags.

unsigned int dtPoly::firstLink

Index to first link in linked list. (Or DT_NULL_LINK if there is no link.)

unsigned short dtPoly::neis[DT_VERTS_PER_POLYGON]

Packed data representing neighbor polygons references and flags for each edge.

Each entry represents data for the edge starting at the vertex of the same index. E.g. The entry at index n represents the edge data for vertex[n] to vertex[n+1].

A value of zero indicates the edge has no polygon connection. (It makes up the border of the navigation mesh.)

The information can be extracted as follows:

neighborRef = neis[n] & 0xff; // Get the neighbor polygon reference.
if (neis[n] & #DT_EX_LINK)
{
// The edge is an external (portal) edge.
}
unsigned char dtPoly::polyType

The bit packed area id and polygon type.

Note
Use the structure's set and get methods to acess this value.
float dtPoly::teamCost[DT_MAX_TEAMS]
unsigned char dtPoly::vertCount

The number of vertices in the polygon.

unsigned short dtPoly::verts[DT_VERTS_PER_POLYGON]

The indices of the polygon's vertices.

The actual vertices are located in dtMeshTile::verts.


The documentation for this struct was generated from the following file: