Dungeon Architect  17.0.0
SharpNav.ContourVertex Struct Reference

A ContourVertex is a vertex that stores 3 integer coordinates and a region ID, and is used to build Contours. More...

Public Member Functions

 ContourVertex (int x, int y, int z, RegionId region)
 Initializes a new instance of the ContourVertex struct. More...
 
 ContourVertex (Vector3 vec, RegionId region)
 Initializes a new instance of the SharpNav.ContourVertex struct. More...
 
 ContourVertex (ContourVertex vert, int index)
 Initializes a new instance of the ContourVertex struct as a copy. More...
 
 ContourVertex (ContourVertex vert, RegionId region)
 Initializes a new instance of the ContourVertex struct as a copy. More...
 

Static Public Member Functions

static bool IsLeft (ref ContourVertex a, ref ContourVertex b, ref ContourVertex c)
 Gets the leftness of a triangle formed from 3 contour vertices. More...
 
static void Area2D (ref ContourVertex a, ref ContourVertex b, ref ContourVertex c, out int area)
 Gets the 2D area of the triangle ABC. More...
 

Public Attributes

int X
 The X coordinate. More...
 
int Y
 The Y coordinate. More...
 
int Z
 The Z coordinate. More...
 
RegionId RegionId
 The region that the vertex belongs to. More...
 

Detailed Description

A ContourVertex is a vertex that stores 3 integer coordinates and a region ID, and is used to build Contours.

Definition at line 22 of file ContourVertex.cs.

Constructor & Destructor Documentation

◆ ContourVertex() [1/4]

SharpNav.ContourVertex.ContourVertex ( int  x,
int  y,
int  z,
RegionId  region 
)

Initializes a new instance of the ContourVertex struct.

Parameters
xThe X coordinate.
yThe Y coordinate.
zThe Z coordinate.
regionThe region ID.

Definition at line 51 of file ContourVertex.cs.

◆ ContourVertex() [2/4]

SharpNav.ContourVertex.ContourVertex ( Vector3  vec,
RegionId  region 
)

Initializes a new instance of the SharpNav.ContourVertex struct.

Parameters
vecThe array of X,Y,Z coordinates.
regionThe Region ID.

Definition at line 64 of file ContourVertex.cs.

◆ ContourVertex() [3/4]

SharpNav.ContourVertex.ContourVertex ( ContourVertex  vert,
int  index 
)

Initializes a new instance of the ContourVertex struct as a copy.

Parameters
vertThe original vertex.
indexThe index of the original vertex, which is temporarily stored in the RegionId field.

Definition at line 77 of file ContourVertex.cs.

◆ ContourVertex() [4/4]

SharpNav.ContourVertex.ContourVertex ( ContourVertex  vert,
RegionId  region 
)

Initializes a new instance of the ContourVertex struct as a copy.

Parameters
vertThe original vertex.
regionThe region that the vertex belongs to.

Definition at line 90 of file ContourVertex.cs.

Member Function Documentation

◆ Area2D()

static void SharpNav.ContourVertex.Area2D ( ref ContourVertex  a,
ref ContourVertex  b,
ref ContourVertex  c,
out int  area 
)
static

Gets the 2D area of the triangle ABC.

Parameters
aPoint A of triangle ABC.
bPoint B of triangle ABC.
cPoint C of triangle ABC.
areaThe 2D area of the triangle.

Definition at line 119 of file ContourVertex.cs.

◆ IsLeft()

static bool SharpNav.ContourVertex.IsLeft ( ref ContourVertex  a,
ref ContourVertex  b,
ref ContourVertex  c 
)
static

Gets the leftness of a triangle formed from 3 contour vertices.

Parameters
aThe first vertex.
bThe second vertex.
cThe third vertex.
Returns
A value indicating the leftness of the triangle.

Definition at line 105 of file ContourVertex.cs.

Member Data Documentation

◆ RegionId

RegionId SharpNav.ContourVertex.RegionId

The region that the vertex belongs to.

Definition at line 42 of file ContourVertex.cs.

◆ X

int SharpNav.ContourVertex.X

The X coordinate.

Definition at line 27 of file ContourVertex.cs.

◆ Y

int SharpNav.ContourVertex.Y

The Y coordinate.

Definition at line 32 of file ContourVertex.cs.

◆ Z

int SharpNav.ContourVertex.Z

The Z coordinate.

Definition at line 37 of file ContourVertex.cs.


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