|
void | CollectTreeMeshes (Terrain terrain, List< RasterizationMesh > result) |
|
RasterizationMesh | GenerateHeightmapChunk (float[,] heights, Vector3 sampleSize, Vector3 offset, int x0, int z0, int width, int depth, int stride) |
| Generates a terrain chunk mesh.
|
|
void | GenerateTerrainChunks (Terrain terrain, Bounds bounds, float desiredChunkSize, List< RasterizationMesh > result) |
|
RasterizationMesh | RasterizeBoxCollider (BoxCollider collider, Matrix4x4 localToWorldMatrix) |
|
RasterizationMesh | RasterizeCapsuleCollider (float radius, float height, Bounds bounds, Matrix4x4 localToWorldMatrix) |
|
RasterizationMesh | RasterizeCollider (Collider col) |
| Rasterizes a collider to a mesh.
|
|
RasterizationMesh | RasterizeCollider (Collider col, Matrix4x4 localToWorldMatrix) |
| Rasterizes a collider to a mesh assuming it's vertices should be multiplied with the matrix.
|
|
|
static int | CeilDivision (int lhs, int rhs) |
| Returns ceil(lhs/rhs), i.e lhs/rhs rounded up.
|
|
static List< MeshFilter > | FilterMeshes (MeshFilter[] meshFilters, List< string > tagMask, LayerMask layerMask) |
|
|
static readonly int[] | BoxColliderTris |
| Box Collider triangle indices can be reused for multiple instances.
|
|
static readonly Vector3[] | BoxColliderVerts |
| Box Collider vertices can be reused for multiple instances.
|
|
RecastMeshGatherer |
( |
Bounds |
bounds, |
|
|
int |
terrainSampleSize, |
|
|
LayerMask |
mask, |
|
|
List< string > |
tagMask, |
|
|
float |
colliderRasterizeDetail |
|
) |
| |
static int CeilDivision |
( |
int |
lhs, |
|
|
int |
rhs |
|
) |
| |
|
staticprivate |
Returns ceil(lhs/rhs), i.e lhs/rhs rounded up.
Find all relevant RecastMeshObj components and create ExtraMeshes for them.
void CollectTerrainMeshes |
( |
bool |
rasterizeTrees, |
|
|
float |
desiredChunkSize, |
|
|
List< RasterizationMesh > |
result |
|
) |
| |
static List<MeshFilter> FilterMeshes |
( |
MeshFilter[] |
meshFilters, |
|
|
List< string > |
tagMask, |
|
|
LayerMask |
layerMask |
|
) |
| |
|
staticprivate |
RasterizationMesh GenerateHeightmapChunk |
( |
float |
heights[,], |
|
|
Vector3 |
sampleSize, |
|
|
Vector3 |
offset, |
|
|
int |
x0, |
|
|
int |
z0, |
|
|
int |
width, |
|
|
int |
depth, |
|
|
int |
stride |
|
) |
| |
|
private |
Generates a terrain chunk mesh.
void GenerateTerrainChunks |
( |
Terrain |
terrain, |
|
|
Bounds |
bounds, |
|
|
float |
desiredChunkSize, |
|
|
List< RasterizationMesh > |
result |
|
) |
| |
|
private |
RasterizationMesh RasterizeBoxCollider |
( |
BoxCollider |
collider, |
|
|
Matrix4x4 |
localToWorldMatrix |
|
) |
| |
|
private |
RasterizationMesh RasterizeCapsuleCollider |
( |
float |
radius, |
|
|
float |
height, |
|
|
Bounds |
bounds, |
|
|
Matrix4x4 |
localToWorldMatrix |
|
) |
| |
|
private |
Rasterizes a collider to a mesh.
This will pass the col.transform.localToWorldMatrix to the other overload of this function.
Rasterizes a collider to a mesh assuming it's vertices should be multiplied with the matrix.
Note that the bounds of the returned ExtraMesh is based on collider.bounds. So you might want to call myExtraMesh.RecalculateBounds on the returned mesh to recalculate it if the collider.bounds would not give the correct value.
readonly int [] BoxColliderTris |
|
staticprivate |
Initial value:= {
0, 1, 2,
0, 2, 3,
6, 5, 4,
7, 6, 4,
0, 5, 1,
0, 4, 5,
1, 6, 2,
1, 5, 6,
2, 7, 3,
2, 6, 7,
3, 4, 0,
3, 7, 4
}
Box Collider triangle indices can be reused for multiple instances.
- Warning
- This array should never be changed
readonly Vector3 [] BoxColliderVerts |
|
staticprivate |
Initial value:= {
new Vector3(-1, -1, -1),
new Vector3(1, -1, -1),
new Vector3(1, -1, 1),
new Vector3(-1, -1, 1),
new Vector3(-1, 1, -1),
new Vector3(1, 1, -1),
new Vector3(1, 1, 1),
new Vector3(-1, 1, 1),
}
Box Collider vertices can be reused for multiple instances.
- Warning
- This array should never be changed
Holds meshes for capsules to avoid generating duplicate capsule meshes for identical capsules.
readonly float colliderRasterizeDetail |
|
private |
readonly List<string> tagMask |
|
private |
readonly int terrainSampleSize |
|
private |
The documentation for this class was generated from the following file:
- /Users/arong/Unity/a-pathfinding-project/Assets/AstarPathfindingProject/Generators/Utilities/RecastMeshGatherer.cs