Class RecastMeshGatherer

Public

Inner Types

Public Methods

Collect2DColliderMeshes ()
Public
CollectColliderMeshes ()
Public
CollectRecastMeshObjs ()

Find all relevant RecastMeshObj components and create ExtraMeshes for them.

Public
CollectSceneMeshes ()
Public
CollectTerrainMeshes (rasterizeTrees, desiredChunkSize)
Public
Finalize ()
Public
RecastMeshGatherer (scene, bounds, terrainDownsamplingFactor, mask, tagMask, maxColliderApproximationError)
Public

Private/Protected Members

AddMeshBuffers (vertices, triangles)
Private
AddMeshBuffers (vertices, triangles)
Private
AddNewMesh (renderer, mesh, area, submeshStart, submeshCount, solid=…, areaIsTag=…)
Private
AddRecastMeshObj (recastMeshObj)
Private
BoxColliderTris

Box Collider triangle indices can be reused for multiple instances.

Private Static Readonly
BoxColliderVerts

Box Collider vertices can be reused for multiple instances.

Private Static Readonly
CalculateBounds (vertices, localToWorldMatrix, bounds)
Private Static
CeilDivision (lhs, rhs)

Returns ceil(lhs/rhs), i.e lhs/rhs rounded up.

Private Static
CircleRadiusAdjustmentFactor (steps)

If a circle is approximated by fewer segments, it will be slightly smaller than the original circle.

Private Static
CircleSteps (matrix, radius, maxError)
Private Static
CollectTreeMeshes (terrain)
Private
GenerateHeightmapChunk (heights, holes, sampleSize, offset, x0, z0, width, depth, stride)

Generates a terrain chunk mesh.

Private
GenerateTerrainChunks (terrain, bounds, desiredChunkSize)
Private
GetColliderMesh (collider, localToWorldMatrix)
Private
GetColliderMesh (col)

Rasterizes a collider to a mesh.

Private
GetColliderMesh (col, localToWorldMatrix)

Rasterizes a collider to a mesh assuming it's vertices should be multiplied with the matrix.

Private
MeshFilterShouldBeIncluded (filter)
Private
MeshType
Private
RasterizeBoxCollider (collider, localToWorldMatrix)
Private
RasterizeCapsuleCollider (radius, height, bounds, localToWorldMatrix)
Private
RecastAreaFromRecastMeshObj (obj)
Private Static
ShouldIncludeCollider (collider)
Private
ShouldIncludeCollider2D (collider)
Private
bounds
Private Readonly
cachedMeshes
Private
cachedTreePrefabs
Private Readonly
mask
Private Readonly
maxColliderApproximationError
Private Readonly
meshData
Private Readonly
meshes
Private
meshesUnreadableAtRuntime
Private Readonly
scene
Private Readonly
tagMask
Private Readonly
terrainDownsamplingFactor
Private Readonly
triangleBuffers
Private Readonly
vertexBuffers
Private Readonly