Method Grid
- Namespace
- Box3D
- Assembly
- Box3D.NET.dll
Grid(int, int, float, int, bool)
Builds a flat grid in the xz plane, useful as a test floor.
public static CollisionMesh Grid(int xCount, int zCount, float cellWidth, int materialCount = 1, bool identifyEdges = true)Parameters
xCountint-
The number of cells along the x axis.
zCountint-
The number of cells along the z axis.
cellWidthfloat-
The size of each cell.
materialCountint-
The number of distinct materials to distribute over the cells.
identifyEdgesbool-
Whether to compute adjacency, which suppresses ghost collisions.
Returns
- CollisionMesh
-
The mesh.