A* Pathfinding Project  3.1.4
The A* Pathfinding Project for Unity 3D
 All Classes Namespaces Files Functions Variables Enumerations Properties Groups Pages
Voxelize Class Reference
+ Collaboration diagram for Voxelize:

Public Member Functions

 Voxelize (float ch, float cs, float wc, float wh, float ms)
 
ushort[] BoxBlur (ushort[] src, ushort[] dst)
 
void BuildCompactField ()
 
void BuildContours (float maxError, int maxEdgeLength, VoxelContourSet cset, int buildFlags)
 
void BuildDistanceField ()
 
void BuildPolyMesh (VoxelContourSet cset, int nvp, out VoxelMesh mesh)
 
void BuildRegions ()
 
void BuildVoxelConnections ()
 
int CalcAreaOfPolygon2D (int[] verts, int nverts)
 
ushort CalculateDistanceField (ushort[] src)
 
Vector3 ConvertPos (int x, int y, int z)
 
Vector3 ConvertPosCorrZ (int x, int y, int z)
 
Vector3 ConvertPosition (int x, int z, int i)
 
Vector3 ConvertPosWithoutOffset (int x, int y, int z)
 
void DrawLine (int a, int b, int[] indices, int[] verts, Color col)
 
void ErodeVoxels (int radius)
 
void ErodeWalkableArea (int radius)
 
ushort[] ExpandRegions (int maxIterations, uint level, ushort[] srcReg, ushort[] srcDist, ushort[] dstReg, ushort[] dstDist, List< int > stack)
 
void FilterLedges (uint voxelWalkableHeight, int voxelWalkableClimb, float cs, float ch, Vector3 min)
 
void FilterLowHeightSpans (uint voxelWalkableHeight, float cs, float ch, Vector3 min)
 
void FilterSmallRegions (ushort[] reg, int minRegionSize, int maxRegions)
 Filters out or merges small regions.
 
bool FloodRegion (int x, int z, int i, uint level, ushort r, ushort[] srcReg, ushort[] srcDist, List< int > stack)
 
int GetCornerHeight (int x, int z, int i, int dir, ref bool isBorderVertex)
 
void MarkRectWithRegion (int minx, int maxx, int minz, int maxz, ushort region, ushort[] srcReg)
 
void OnGUI ()
 
void RemoveDegenerateSegments (List< int > simplified)
 
void SimplifyContour (List< int > verts, List< int > simplified, float maxError, int maxEdgeLenght, int buildFlags)
 
int Triangulate (int n, int[] verts, ref int[] indices, ref int[] tris)
 
VoxelArea VoxelizeMesh (MeshFilter[] filters, RecastGraph.ExtraMesh[] extraMeshes=null)
 
void WalkContour (int x, int z, int i, int[] flags, List< int > verts)
 

Static Public Member Functions

static int Area2 (int a, int b, int c, int[] verts)
 
static Bounds CollectMeshes (MeshFilter[] filters, RecastGraph.ExtraMesh[] extraMeshes, Bounds bounds, out Vector3[] verts, out int[] tris)
 
static bool Collinear (int a, int b, int c, int[] verts)
 
static bool Diagonal (int i, int j, int n, int[] verts, int[] indices)
 
static bool Ileft (int a, int b, int c, int[] va, int[] vb, int[] vc)
 
static bool InCone (int i, int j, int n, int[] verts, int[] indices)
 
static bool IntersectProp (int a, int b, int c, int d, int[] verts)
 
static bool Left (int a, int b, int c, int[] verts)
 
static bool LeftOn (int a, int b, int c, int[] verts)
 
static bool MergeContours (ref VoxelContour ca, ref VoxelContour cb, int ia, int ib)
 
static int Next (int i, int n)
 
static int Prev (int i, int n)
 
static bool Xorb (bool x, bool y)
 

Public Attributes

float cellHeight = 0.1F
 
float cellSize = 0.2F
 
VoxelContourSet countourSet
 
string debugString = ""
 
Bounds forcedBounds
 
bool includeOutOfBounds = false
 
float maxEdgeLength = 20
 
float maxSlope = 30
 
int runTimes = 10
 
VoxelArea voxelArea
 
Vector3 voxelOffset
 
int voxelWalkableClimb
 
uint voxelWalkableHeight
 
float walkableClimb = 0.8F
 
float walkableHeight = 0.8F
 

Static Public Attributes

static Vector3 CellScale
 
static Vector3 CellScaleDivision
 
static int MaxLayers = 65535
 
static int MaxRegions = 500
 
static uint NotConnected = 0x3f
 
static int RC_CONTOUR_TESS_AREA_EDGES = 0x02
 
static int RC_CONTOUR_TESS_WALL_EDGES = 0x01
 
static int UnwalkableArea = 0
 
static int VERTEX_BUCKET_COUNT = 1<<12
 

Private Member Functions

void GetClosestIndices (int[] vertsa, int nvertsa, int[] vertsb, int nvertsb, ref int ia, ref int ib)
 

Static Private Member Functions

static bool Between (int a, int b, int c, int[] verts)
 
static bool Diagonalie (int i, int j, int n, int[] verts, int[] indices)
 
static bool Intersect (int a, int b, int c, int d, int[] verts)
 
static bool Vequal (int a, int b, int[] verts)
 

Static Private Attributes

static ushort BorderReg = 0x8000
 
static int ContourRegMask = 0xffff
 
static int RC_AREA_BORDER = 0x20000
 
static int RC_BORDER_VERTEX = 0x10000
 

Detailed Description

A* Pro Feature:
This is an A* Pathfinding Project Pro feature only. This function/class/variable might not exist in the Free version of the A* Pathfinding Project or the functionality might be limited
The Pro version can be bought here

Member Function Documentation

void ErodeVoxels ( int  radius)
Todo:
Complete the ErodeVoxels function translation
void FilterSmallRegions ( ushort[]  reg,
int  minRegionSize,
int  maxRegions 
)

Filters out or merges small regions.

Todo:
This function has not been translated entirely (don't use it)

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