Dungeon Architect  17.0.0
SharpNav.PolyMesh Class Reference

The class of Poly mesh. More...

Classes

class  Polygon
 Each polygon is a collection of vertices. It is the basic unit of the PolyMesh More...
 

Public Member Functions

 PolyMesh (ContourSet contSet, NavMeshGenerationSettings settings)
 Initializes a new instance of the PolyMesh class. More...
 
 PolyMesh (ContourSet contSet, float cellSize, float cellHeight, int borderSize, int numVertsPerPoly)
 Initializes a new instance of the PolyMesh class by creating polygons from contours. More...
 

Static Public Member Functions

static bool IsBoundaryEdge (int flag)
 Determines if it is a boundary edge with the specified flag. More...
 
static bool IsInteriorEdge (int flag)
 Determines if it is an interior edge with the specified flag. More...
 
static bool HasDiagonalFlag (int index)
 Determines if it is a diagonal flag on the specified index. More...
 
static bool Diagonal (int i, int j, PolyVertex[] verts, int[] indices)
 True if and only if (v[i], v[j]) is a proper internal diagonal of polygon. More...
 
static bool InCone (int i, int j, PolyVertex[] verts, int[] indices)
 True if and only if diagonal (i, j) is strictly internal to polygon in neighborhood of i endpoint. More...
 
static bool Diagonalie (int i, int j, PolyVertex[] verts, int[] indices)
 True if and only if (v[i], v[j]) is internal or external diagonal ignoring edges incident to v[i] or v[j]. More...
 

Static Public Attributes

const int NullId = -1
 

Properties

int VertCount [get]
 Gets the number of vertices More...
 
int PolyCount [get]
 Gets the number of polygons More...
 
int NumVertsPerPoly [get]
 Gets the number of vertices per polygon More...
 
PolyVertex[] Verts [get]
 Gets the vertex data More...
 
Polygon[] Polys [get]
 Gets the polygon data More...
 
BBox3 Bounds [get]
 Gets the bounds. More...
 
float CellSize [get]
 Gets the cell size More...
 
float CellHeight [get]
 Gets the cell height More...
 
int BorderSize [get]
 Gets the border size More...
 

Detailed Description

The class of Poly mesh.

Definition at line 22 of file PolyMesh.cs.

Constructor & Destructor Documentation

◆ PolyMesh() [1/2]

SharpNav.PolyMesh.PolyMesh ( ContourSet  contSet,
NavMeshGenerationSettings  settings 
)

Initializes a new instance of the PolyMesh class.

Parameters
contSetThe ContourSet to generate polygons from.
settingsThe settings to build with.

Definition at line 47 of file PolyMesh.cs.

◆ PolyMesh() [2/2]

SharpNav.PolyMesh.PolyMesh ( ContourSet  contSet,
float  cellSize,
float  cellHeight,
int  borderSize,
int  numVertsPerPoly 
)

Initializes a new instance of the PolyMesh class by creating polygons from contours.

Parameters
contSetThe ContourSet to generate polygons from.
cellSizeThe size of one voxel/cell.
cellHeightThe height of one voxel/cell.
borderSizeThe size of the border around the mesh.
numVertsPerPolyThe maximum number of vertices per polygon.

Definition at line 60 of file PolyMesh.cs.

Member Function Documentation

◆ Diagonal()

static bool SharpNav.PolyMesh.Diagonal ( int  i,
int  j,
PolyVertex[]  verts,
int[]  indices 
)
static

True if and only if (v[i], v[j]) is a proper internal diagonal of polygon.

Parameters
iVertex index i
jVertex index j
vertsContour vertices
indicesPolyMesh indices
Returns
True, if internal diagonal. False, if otherwise.

Definition at line 415 of file PolyMesh.cs.

◆ Diagonalie()

static bool SharpNav.PolyMesh.Diagonalie ( int  i,
int  j,
PolyVertex[]  verts,
int[]  indices 
)
static

True if and only if (v[i], v[j]) is internal or external diagonal ignoring edges incident to v[i] or v[j].

Parameters
iVertex index i
jVertex index j
vertsContour vertices
indicesPolyMesh indices
Returns
True, if internal or external diagonal. False, if otherwise.

Definition at line 453 of file PolyMesh.cs.

◆ HasDiagonalFlag()

static bool SharpNav.PolyMesh.HasDiagonalFlag ( int  index)
static

Determines if it is a diagonal flag on the specified index.

Parameters
indexThe index
Returns
true if it is a diagonal flag on the specified index; otherwise, false.

Definition at line 402 of file PolyMesh.cs.

◆ InCone()

static bool SharpNav.PolyMesh.InCone ( int  i,
int  j,
PolyVertex[]  verts,
int[]  indices 
)
static

True if and only if diagonal (i, j) is strictly internal to polygon in neighborhood of i endpoint.

Parameters
iVertex index i
jVertex index j
vertsContour vertices
indicesPolyMesh indices
Returns
True, if internal. False, if otherwise.

Definition at line 429 of file PolyMesh.cs.

◆ IsBoundaryEdge()

static bool SharpNav.PolyMesh.IsBoundaryEdge ( int  flag)
static

Determines if it is a boundary edge with the specified flag.

Returns
true if is boundary edge the specified flag; otherwise, false.
Parameters
flagThe flag.

Definition at line 382 of file PolyMesh.cs.

◆ IsInteriorEdge()

static bool SharpNav.PolyMesh.IsInteriorEdge ( int  flag)
static

Determines if it is an interior edge with the specified flag.

Returns
true if is interior edge the specified flag; otherwise, false.
Parameters
flagThe flag.

Definition at line 392 of file PolyMesh.cs.

Property Documentation

◆ BorderSize

int SharpNav.PolyMesh.BorderSize
get

Gets the border size

Definition at line 369 of file PolyMesh.cs.

◆ Bounds

BBox3 SharpNav.PolyMesh.Bounds
get

Gets the bounds.

The bounds.

Definition at line 336 of file PolyMesh.cs.

◆ CellHeight

float SharpNav.PolyMesh.CellHeight
get

Gets the cell height

Definition at line 358 of file PolyMesh.cs.

◆ CellSize

float SharpNav.PolyMesh.CellSize
get

Gets the cell size

Definition at line 347 of file PolyMesh.cs.

◆ NumVertsPerPoly

int SharpNav.PolyMesh.NumVertsPerPoly
get

Gets the number of vertices per polygon

Definition at line 302 of file PolyMesh.cs.

◆ PolyCount

int SharpNav.PolyMesh.PolyCount
get

Gets the number of polygons

Definition at line 291 of file PolyMesh.cs.

◆ Polys

Polygon [] SharpNav.PolyMesh.Polys
get

Gets the polygon data

Definition at line 324 of file PolyMesh.cs.

◆ VertCount

int SharpNav.PolyMesh.VertCount
get

Gets the number of vertices

Definition at line 280 of file PolyMesh.cs.

◆ Verts

PolyVertex [] SharpNav.PolyMesh.Verts
get

Gets the vertex data

Definition at line 313 of file PolyMesh.cs.


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