engine
 
载入中...
搜索中...
未找到
Public 成员函数 | Public 属性 | 所有成员列表
dtPoly结构体 参考

Defines a polyogn within a dtMeshTile object. 更多...

#include <DetourNavMesh.h>

Public 成员函数

unsigned char getArea () const
 Gets the user defined area id.
 
unsigned char getType () const
 Gets the polygon type. (See: dtPolyTypes)
 
void setArea (unsigned char a)
 Sets the user defined area id. [Limit: < DT_MAX_AREAS]
 
void setType (unsigned char t)
 Sets the polygon type. (See: dtPolyTypes.)
 

Public 属性

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

详细描述

Defines a polyogn within a dtMeshTile object.

类成员变量说明

◆ areaAndtype

unsigned char dtPoly::areaAndtype

The bit packed area id and polygon type.

注解
Use the structure's set and get methods to acess this value.

◆ neis

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 short neis[DT_VERTS_PER_POLYGON]
Packed data representing neighbor polygons references and flags for each edge.
Definition: DetourNavMesh.h:196

◆ verts

unsigned short dtPoly::verts[DT_VERTS_PER_POLYGON]

The indices of the polygon's vertices.

The actual vertices are located in dtMeshTile::verts.


该结构体的文档由以下文件生成: