C# Class Pathfinding.Voxels.Voxelize

Datei anzeigen Open project: henryj41043/TheUnseen Class Usage Examples

Public Properties

Property Type Description
borderSize int
cellHeight float
cellScale UnityEngine.Vector3
cellScaleDivision UnityEngine.Vector3
cellSize float
countourSet VoxelContourSet
debugString string
depth int
forcedBounds UnityEngine.Bounds
inputExtraMeshes List
maxEdgeLength float
maxSlope float
minRegionSize int
relevantGraphSurfaceMode RecastGraph.RelevantGraphSurfaceMode
voxelArea VoxelArea
voxelOffset UnityEngine.Vector3
voxelWalkableClimb int
voxelWalkableHeight uint
width int

Protected Properties

Property Type Description
inputTriangles int[]
inputVertices UnityEngine.Vector3[]

Public Methods

Method Description
Area2 ( int a, int b, int c, int verts ) : int
BoxBlur ( ushort src, ushort dst ) : ushort[]
BuildCompactField ( ) : void
BuildContours ( float maxError, int maxEdgeLength, VoxelContourSet cset, int buildFlags ) : void
BuildDistanceField ( ) : void
BuildPolyMesh ( VoxelContourSet cset, int nvp, VoxelMesh &mesh ) : void
BuildRegions ( ) : void
BuildVoxelConnections ( ) : void
CalcAreaOfPolygon2D ( int verts, int nverts ) : int
CalculateDistanceField ( ushort src ) : ushort
CollectMeshes ( ) : void
CollectMeshes ( List extraMeshes, Bounds bounds, Vector3 &verts, int &tris ) : void
Collinear ( int a, int b, int c, int verts ) : bool
CompactSpanToVector ( int x, int z, int i ) : Vector3
ConvertPos ( int x, int y, int z ) : Vector3
ConvertPosCorrZ ( int x, int y, int z ) : Vector3
ConvertPosWithoutOffset ( int x, int y, int z ) : Vector3
ConvertPosition ( int x, int z, int i ) : Vector3
Diagonal ( int i, int j, int n, int verts, int indices ) : bool
DrawLine ( int a, int b, int indices, int verts, Color col ) : void
ErodeWalkableArea ( int radius ) : void
ExpandRegions ( int maxIterations, uint level, ushort srcReg, ushort srcDist, ushort dstReg, ushort dstDist, List stack ) : ushort[]
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 ) : void
FloodOnes ( List st1, ushort regs, uint level, ushort reg ) : void
FloodRegion ( int x, int z, int i, uint level, ushort r, ushort srcReg, ushort srcDist, List stack ) : bool
GetClosestIndices ( int vertsa, int nvertsa, int vertsb, int nvertsb, int &ia, int &ib ) : void
GetCornerHeight ( int x, int z, int i, int dir, bool &isBorderVertex ) : int
Ileft ( int a, int b, int c, int va, int vb, int vc ) : bool
InCone ( int i, int j, int n, int verts, int indices ) : bool
Init ( ) : void
IntersectProp ( int a, int b, int c, int d, int verts ) : bool
Left ( int a, int b, int c, int verts ) : bool
LeftOn ( int a, int b, int c, int verts ) : bool
MarkRectWithRegion ( int minx, int maxx, int minz, int maxz, ushort region, ushort srcReg ) : void
MergeContours ( VoxelContour &ca, VoxelContour &cb, int ia, int ib ) : bool
Next ( int i, int n ) : int
OnGUI ( ) : void
Prev ( int i, int n ) : int
RemoveDegenerateSegments ( List simplified ) : void
SimplifyContour ( List verts, List simplified, float maxError, int maxEdgeLenght, int buildFlags ) : void
Triangulate ( int n, int verts, int &indices, int &tris ) : int
VectorToIndex ( Vector3 p, int &x, int &z ) : void
Voxelize ( float ch, float cs, float wc, float wh, float ms ) : UnityEngine
VoxelizeInput ( ) : void
WalkContour ( int x, int z, int i, ushort flags, List verts ) : void
Xorb ( bool x, bool y ) : bool

Private Methods

Method Description
Between ( int a, int b, int c, int verts ) : bool
ClaimIntArr ( int minCapacity, bool zero ) : int[]
Diagonalie ( int i, int j, int n, int verts, int indices ) : bool
ErodeVoxels ( int radius ) : void
Intersect ( int a, int b, int c, int d, int verts ) : bool
ReleaseContours ( VoxelContourSet cset ) : void
ReleaseIntArr ( int arr ) : void
Vequal ( int a, int b, int verts ) : bool
union_find_find ( int arr, int x ) : int
union_find_union ( int arr, int a, int b ) : void

Method Details

Area2() public static method

public static Area2 ( int a, int b, int c, int verts ) : int
a int
b int
c int
verts int
return int

BoxBlur() public method

public BoxBlur ( ushort src, ushort dst ) : ushort[]
src ushort
dst ushort
return ushort[]

BuildCompactField() public method

public BuildCompactField ( ) : void
return void

BuildContours() public method

public BuildContours ( float maxError, int maxEdgeLength, VoxelContourSet cset, int buildFlags ) : void
maxError float
maxEdgeLength int
cset VoxelContourSet
buildFlags int
return void

BuildDistanceField() public method

public BuildDistanceField ( ) : void
return void

BuildPolyMesh() public method

public BuildPolyMesh ( VoxelContourSet cset, int nvp, VoxelMesh &mesh ) : void
cset VoxelContourSet
nvp int
mesh VoxelMesh
return void

BuildRegions() public method

public BuildRegions ( ) : void
return void

BuildVoxelConnections() public method

public BuildVoxelConnections ( ) : void
return void

CalcAreaOfPolygon2D() public method

public CalcAreaOfPolygon2D ( int verts, int nverts ) : int
verts int
nverts int
return int

CalculateDistanceField() public method

public CalculateDistanceField ( ushort src ) : ushort
src ushort
return ushort

CollectMeshes() public method

public CollectMeshes ( ) : void
return void

CollectMeshes() public static method

public static CollectMeshes ( List extraMeshes, Bounds bounds, Vector3 &verts, int &tris ) : void
extraMeshes List
bounds UnityEngine.Bounds
verts UnityEngine.Vector3
tris int
return void

Collinear() public static method

public static Collinear ( int a, int b, int c, int verts ) : bool
a int
b int
c int
verts int
return bool

CompactSpanToVector() public method

public CompactSpanToVector ( int x, int z, int i ) : Vector3
x int
z int
i int
return UnityEngine.Vector3

ConvertPos() public method

public ConvertPos ( int x, int y, int z ) : Vector3
x int
y int
z int
return UnityEngine.Vector3

ConvertPosCorrZ() public method

public ConvertPosCorrZ ( int x, int y, int z ) : Vector3
x int
y int
z int
return UnityEngine.Vector3

ConvertPosWithoutOffset() public method

public ConvertPosWithoutOffset ( int x, int y, int z ) : Vector3
x int
y int
z int
return UnityEngine.Vector3

ConvertPosition() public method

public ConvertPosition ( int x, int z, int i ) : Vector3
x int
z int
i int
return UnityEngine.Vector3

Diagonal() public static method

public static Diagonal ( int i, int j, int n, int verts, int indices ) : bool
i int
j int
n int
verts int
indices int
return bool

DrawLine() public method

public DrawLine ( int a, int b, int indices, int verts, Color col ) : void
a int
b int
indices int
verts int
col UnityEngine.Color
return void

ErodeWalkableArea() public method

public ErodeWalkableArea ( int radius ) : void
radius int
return void

ExpandRegions() public method

public ExpandRegions ( int maxIterations, uint level, ushort srcReg, ushort srcDist, ushort dstReg, ushort dstDist, List stack ) : ushort[]
maxIterations int
level uint
srcReg ushort
srcDist ushort
dstReg ushort
dstDist ushort
stack List
return ushort[]

FilterLedges() public method

public FilterLedges ( uint voxelWalkableHeight, int voxelWalkableClimb, float cs, float ch, Vector3 min ) : void
voxelWalkableHeight uint
voxelWalkableClimb int
cs float
ch float
min UnityEngine.Vector3
return void

FilterLowHeightSpans() public method

public FilterLowHeightSpans ( uint voxelWalkableHeight, float cs, float ch, Vector3 min ) : void
voxelWalkableHeight uint
cs float
ch float
min UnityEngine.Vector3
return void

FilterSmallRegions() public method

public FilterSmallRegions ( ushort reg, int minRegionSize, int maxRegions ) : void
reg ushort
minRegionSize int
maxRegions int
return void

FloodOnes() public method

public FloodOnes ( List st1, ushort regs, uint level, ushort reg ) : void
st1 List
regs ushort
level uint
reg ushort
return void

FloodRegion() public method

public FloodRegion ( int x, int z, int i, uint level, ushort r, ushort srcReg, ushort srcDist, List stack ) : bool
x int
z int
i int
level uint
r ushort
srcReg ushort
srcDist ushort
stack List
return bool

GetClosestIndices() public method

public GetClosestIndices ( int vertsa, int nvertsa, int vertsb, int nvertsb, int &ia, int &ib ) : void
vertsa int
nvertsa int
vertsb int
nvertsb int
ia int
ib int
return void

GetCornerHeight() public method

public GetCornerHeight ( int x, int z, int i, int dir, bool &isBorderVertex ) : int
x int
z int
i int
dir int
isBorderVertex bool
return int

Ileft() public static method

public static Ileft ( int a, int b, int c, int va, int vb, int vc ) : bool
a int
b int
c int
va int
vb int
vc int
return bool

InCone() public static method

public static InCone ( int i, int j, int n, int verts, int indices ) : bool
i int
j int
n int
verts int
indices int
return bool

Init() public method

public Init ( ) : void
return void

IntersectProp() public static method

public static IntersectProp ( int a, int b, int c, int d, int verts ) : bool
a int
b int
c int
d int
verts int
return bool

Left() public static method

public static Left ( int a, int b, int c, int verts ) : bool
a int
b int
c int
verts int
return bool

LeftOn() public static method

public static LeftOn ( int a, int b, int c, int verts ) : bool
a int
b int
c int
verts int
return bool

MarkRectWithRegion() public method

public MarkRectWithRegion ( int minx, int maxx, int minz, int maxz, ushort region, ushort srcReg ) : void
minx int
maxx int
minz int
maxz int
region ushort
srcReg ushort
return void

MergeContours() public static method

public static MergeContours ( VoxelContour &ca, VoxelContour &cb, int ia, int ib ) : bool
ca VoxelContour
cb VoxelContour
ia int
ib int
return bool

Next() public static method

public static Next ( int i, int n ) : int
i int
n int
return int

OnGUI() public method

public OnGUI ( ) : void
return void

Prev() public static method

public static Prev ( int i, int n ) : int
i int
n int
return int

RemoveDegenerateSegments() public method

public RemoveDegenerateSegments ( List simplified ) : void
simplified List
return void

SimplifyContour() public method

public SimplifyContour ( List verts, List simplified, float maxError, int maxEdgeLenght, int buildFlags ) : void
verts List
simplified List
maxError float
maxEdgeLenght int
buildFlags int
return void

Triangulate() public method

public Triangulate ( int n, int verts, int &indices, int &tris ) : int
n int
verts int
indices int
tris int
return int

VectorToIndex() public method

public VectorToIndex ( Vector3 p, int &x, int &z ) : void
p UnityEngine.Vector3
x int
z int
return void

Voxelize() public method

public Voxelize ( float ch, float cs, float wc, float wh, float ms ) : UnityEngine
ch float
cs float
wc float
wh float
ms float
return UnityEngine

VoxelizeInput() public method

public VoxelizeInput ( ) : void
return void

WalkContour() public method

public WalkContour ( int x, int z, int i, ushort flags, List verts ) : void
x int
z int
i int
flags ushort
verts List
return void

Xorb() public static method

public static Xorb ( bool x, bool y ) : bool
x bool
y bool
return bool

Property Details

borderSize public_oe property

public int borderSize
return int

cellHeight public_oe property

public float cellHeight
return float

cellScale public_oe property

public Vector3,UnityEngine cellScale
return UnityEngine.Vector3

cellScaleDivision public_oe property

public Vector3,UnityEngine cellScaleDivision
return UnityEngine.Vector3

cellSize public_oe property

public float cellSize
return float

countourSet public_oe property

public VoxelContourSet,Pathfinding.Voxels countourSet
return VoxelContourSet

debugString public_oe property

public string debugString
return string

depth public_oe property

public int depth
return int

forcedBounds public_oe property

public Bounds,UnityEngine forcedBounds
return UnityEngine.Bounds

inputExtraMeshes public_oe property

public List inputExtraMeshes
return List

inputTriangles protected_oe property

protected int[] inputTriangles
return int[]

inputVertices protected_oe property

protected Vector3[],UnityEngine inputVertices
return UnityEngine.Vector3[]

maxEdgeLength public_oe property

public float maxEdgeLength
return float

maxSlope public_oe property

public float maxSlope
return float

minRegionSize public_oe property

public int minRegionSize
return int

relevantGraphSurfaceMode public_oe property

public RecastGraph.RelevantGraphSurfaceMode relevantGraphSurfaceMode
return RecastGraph.RelevantGraphSurfaceMode

voxelArea public_oe property

public VoxelArea,Pathfinding.Voxels voxelArea
return VoxelArea

voxelOffset public_oe property

public Vector3,UnityEngine voxelOffset
return UnityEngine.Vector3

voxelWalkableClimb public_oe property

public int voxelWalkableClimb
return int

voxelWalkableHeight public_oe property

public uint voxelWalkableHeight
return uint

width public_oe property

public int width
return int