Table of Contents

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

xCount int

The number of cells along the x axis.

zCount int

The number of cells along the z axis.

cellWidth float

The size of each cell.

materialCount int

The number of distinct materials to distribute over the cells.

identifyEdges bool

Whether to compute adjacency, which suppresses ghost collisions.

Returns

CollisionMesh

The mesh.