Dungeon Architect  17.0.0
SharpNav.AreaGenerator Class Reference

A class that filters geometry and applies an Area to it. More...

Public Member Functions

Area[] ToArray ()
 Takes the mesh query, runs it, and outputs the result as an array of Area. More...
 
AreaGenerator MarkAboveSlope (float angle, Area area)
 Marks all triangles above a specified angle with a sepcified area ID. More...
 
AreaGenerator MarkBelowSlope (float angle, Area area)
 Marks all triangles below a specified angle with a sepcified area ID. More...
 
AreaGenerator MarkAtSlope (float angle, float range, Area area)
 Marks all triangles around a specified angle with a sepcified area ID. More...
 
AreaGenerator MarkBelowHeight (float y, Area area)
 Marks all triangles below a specified height with a sepcified area ID. More...
 
AreaGenerator MarkAtHeight (float y, float radius, Area area)
 Marks all triangles around a specified height with a sepcified area ID. More...
 
AreaGenerator MarkAboveHeight (float y, Area area)
 Marks all triangles above a specified height with a sepcified area ID. More...
 
AreaGenerator MarkCustomFilter (Func< Triangle3, bool > func, Area area)
 Marks all triangles that meet a specified condition with a specified area ID. More...
 

Static Public Member Functions

static AreaGenerator From (IEnumerable< Triangle3 > tris, Area area)
 Create instance from the specified triangles with specified area. More...
 
static AreaGenerator From (IEnumerable< Triangle3 > tris, int triCount, Area area)
 Create instance from triCount(a integer) specified triangles with specified area More...
 
static AreaGenerator From (Triangle3[] tris, Area area)
 Create instance from every specified triangles in array of tris with specified area. More...
 
static AreaGenerator From (Triangle3[] tris, int triOffset, int triCount, Area area)
 Create instance from specified triangles in array of tris from tris[triOffset] to tris[triOffset+triCount] with specified area. More...
 
static AreaGenerator From (Vector3[] verts, Area area)
 Create instance from the triangles created from points in verts with specified area More...
 
static AreaGenerator From (Vector3[] verts, int vertOffset, int vertStride, int triCount, Area area)
 Create instance from the triangles created from points start from verts[0*vertStride+vertOffset] to verts[(triCount-1)*vertStride+vertOffset]with specified area More...
 
static AreaGenerator From (float[] verts, Area area)
 Create instance from the triangles created from points in verts with specified area More...
 
static AreaGenerator From (float[] verts, int floatOffset, int floatStride, int triCount, Area area)
 Create instance from the triangles created from points start from verts[0*vertStride+vertOffset] to verts[(triCount-1)*vertStride+vertOffset]with specified area. More...
 
static AreaGenerator From (Vector3[] verts, int[] inds, Area area)
 Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area More...
 
static AreaGenerator From (Vector3[] verts, int[] inds, int vertOffset, int vertStride, int indexOffset, int triCount, Area area)
 Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area More...
 
static AreaGenerator From (float[] verts, int[] inds, Area area)
 Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area More...
 
static AreaGenerator From (float[] verts, int[] inds, int floatOffset, int floatStride, int indexOffset, int triCount, Area area)
 Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area More...
 

Detailed Description

A class that filters geometry and applies an Area to it.

Definition at line 22 of file AreaIdGenerator.cs.

Member Function Documentation

◆ From() [1/12]

static AreaGenerator SharpNav.AreaGenerator.From ( float[]  verts,
Area  area 
)
static

Create instance from the triangles created from points in verts with specified area

Parameters
vertsAn array of vertices.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 121 of file AreaIdGenerator.cs.

◆ From() [2/12]

static AreaGenerator SharpNav.AreaGenerator.From ( float[]  verts,
int  floatOffset,
int  floatStride,
int  triCount,
Area  area 
)
static

Create instance from the triangles created from points start from verts[0*vertStride+vertOffset] to verts[(triCount-1)*vertStride+vertOffset]with specified area.

Parameters
vertsAn array of vertices.
floatOffsetThe index of the first float to be enumerated.
floatStrideThe distance between the start of two vertices. A value of 0 means the data is tightly packed.
triCountThe number of triangles to enumerate.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 135 of file AreaIdGenerator.cs.

◆ From() [3/12]

static AreaGenerator SharpNav.AreaGenerator.From ( float[]  verts,
int[]  inds,
Area  area 
)
static

Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area

Parameters
vertsAn array of vertices.
indsAn array of indices.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 175 of file AreaIdGenerator.cs.

◆ From() [4/12]

static AreaGenerator SharpNav.AreaGenerator.From ( float[]  verts,
int[]  inds,
int  floatOffset,
int  floatStride,
int  indexOffset,
int  triCount,
Area  area 
)
static

Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area

Parameters
vertsAn array of vertices.
indsAn array of indices.
floatOffsetThe index of the first float to be enumerated.
floatStrideThe distance between the start of two vertices. A value of 0 means the data is tightly packed.
indexOffsetThe index of the first index to be enumerated.
triCountThe number of triangles to enumerate.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 191 of file AreaIdGenerator.cs.

◆ From() [5/12]

static AreaGenerator SharpNav.AreaGenerator.From ( IEnumerable< Triangle3 tris,
Area  area 
)
static

Create instance from the specified triangles with specified area.

Parameters
trisCollection of Triangles.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 49 of file AreaIdGenerator.cs.

◆ From() [6/12]

static AreaGenerator SharpNav.AreaGenerator.From ( IEnumerable< Triangle3 tris,
int  triCount,
Area  area 
)
static

Create instance from triCount(a integer) specified triangles with specified area

Parameters
trisCollection of Triangles.
triCountThe number of triangles to enumerate.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 61 of file AreaIdGenerator.cs.

◆ From() [7/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Triangle3[]  tris,
Area  area 
)
static

Create instance from every specified triangles in array of tris with specified area.

Parameters
trisAn array of triangles.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 72 of file AreaIdGenerator.cs.

◆ From() [8/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Triangle3[]  tris,
int  triOffset,
int  triCount,
Area  area 
)
static

Create instance from specified triangles in array of tris from tris[triOffset] to tris[triOffset+triCount] with specified area.

Parameters
trisAn array of triangles.
triOffsetTri offset.
triCountTri count.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 85 of file AreaIdGenerator.cs.

◆ From() [9/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Vector3[]  verts,
Area  area 
)
static

Create instance from the triangles created from points in verts with specified area

Parameters
vertsAn array of Vectors3.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 96 of file AreaIdGenerator.cs.

◆ From() [10/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Vector3[]  verts,
int  vertOffset,
int  vertStride,
int  triCount,
Area  area 
)
static

Create instance from the triangles created from points start from verts[0*vertStride+vertOffset] to verts[(triCount-1)*vertStride+vertOffset]with specified area

Parameters
vertsAn array of Vectors3.
vertOffsetThe index of the first Vectex to be enumerated.
vertStrideThe distance between the start of two triangles. A value of 0 means the data is tightly packed.
triCountThe number of triangles to enumerate..
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 110 of file AreaIdGenerator.cs.

◆ From() [11/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Vector3[]  verts,
int[]  inds,
Area  area 
)
static

Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area

Parameters
vertsAn array of vertices.
indsAn array of indices.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 147 of file AreaIdGenerator.cs.

◆ From() [12/12]

static AreaGenerator SharpNav.AreaGenerator.From ( Vector3[]  verts,
int[]  inds,
int  vertOffset,
int  vertStride,
int  indexOffset,
int  triCount,
Area  area 
)
static

Create instance from triangles created from points of verts which is created from array of index of vertices array with specified area

Parameters
vertsAn array of vertices.
indsAn array of indices.
vertOffsetThe index of the first vertex to be enumerated.
vertStrideThe distance between the start of two triangles. A value of 0 means the data is tightly packed.
indexOffsetThe index of the first index to be enumerated.
triCountThe number of triangles to enumerate.
areaArea of Triangle.
Returns
A new AreaIdGenerator.

Definition at line 163 of file AreaIdGenerator.cs.

◆ MarkAboveHeight()

AreaGenerator SharpNav.AreaGenerator.MarkAboveHeight ( float  y,
Area  area 
)

Marks all triangles above a specified height with a sepcified area ID.

Parameters
yThe height threshold of a triangle.
areaThe area ID to set for triangles above the threshold.
Returns
The same instance.

Definition at line 322 of file AreaIdGenerator.cs.

◆ MarkAboveSlope()

AreaGenerator SharpNav.AreaGenerator.MarkAboveSlope ( float  angle,
Area  area 
)

Marks all triangles above a specified angle with a sepcified area ID.

Parameters
angleThe minimum angle in radians.
areaThe area ID to set for triangles above the slope.
Returns
The same instance.

Definition at line 225 of file AreaIdGenerator.cs.

◆ MarkAtHeight()

AreaGenerator SharpNav.AreaGenerator.MarkAtHeight ( float  y,
float  radius,
Area  area 
)

Marks all triangles around a specified height with a sepcified area ID.

Parameters
yThe height value.
radiusThe maximum allowed difference between the height and a triangle's height.
areaThe area ID to set for triangles around the height.
Returns
The same instance.

Definition at line 311 of file AreaIdGenerator.cs.

◆ MarkAtSlope()

AreaGenerator SharpNav.AreaGenerator.MarkAtSlope ( float  angle,
float  range,
Area  area 
)

Marks all triangles around a specified angle with a sepcified area ID.

Parameters
angleThe angle.
rangeThe maximum allowed difference between the angle and a triangle's angle.
areaThe area ID to set for triangles around the slope.
Returns
The same instance.

Definition at line 268 of file AreaIdGenerator.cs.

◆ MarkBelowHeight()

AreaGenerator SharpNav.AreaGenerator.MarkBelowHeight ( float  y,
Area  area 
)

Marks all triangles below a specified height with a sepcified area ID.

Parameters
yThe height threshold of a triangle.
areaThe area ID to set for triangles below the threshold.
Returns
The same instance.

Definition at line 289 of file AreaIdGenerator.cs.

◆ MarkBelowSlope()

AreaGenerator SharpNav.AreaGenerator.MarkBelowSlope ( float  angle,
Area  area 
)

Marks all triangles below a specified angle with a sepcified area ID.

Parameters
angleThe maximum angle.
areaThe area ID to set for triangles below the slope.
Returns
The same instance.

Definition at line 246 of file AreaIdGenerator.cs.

◆ MarkCustomFilter()

AreaGenerator SharpNav.AreaGenerator.MarkCustomFilter ( Func< Triangle3, bool >  func,
Area  area 
)

Marks all triangles that meet a specified condition with a specified area ID.

Parameters
funcThe condition to be tested on each triangle.
areaThe area ID to set for triangles that match the condition.
Returns
The same instance.

Definition at line 343 of file AreaIdGenerator.cs.

◆ ToArray()

Area [] SharpNav.AreaGenerator.ToArray ( )

Takes the mesh query, runs it, and outputs the result as an array of Area.

Returns
The result of the query.

Definition at line 200 of file AreaIdGenerator.cs.


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