public readonly record struct GridBoxA box measured in whole grid cells, which is what the cube-grid tool selects.
Remarks
Doc 24 files the cube grid as "its own tool because it has its own selection model", and this is that model. Everything else in the toolset selects vertices, edges and faces; this selects a region of the lattice, in integers, and the only thing you can do to it is grow it, shrink it and push its faces — which is why it cannot be expressed as an element selection and why it needs a type.
⚠ Integers, and that is the whole point rather than an implementation choice. A box whose extents are cell counts cannot drift off the grid, cannot be a quarter of a cell wide after nine pushes, and lines up with the box beside it exactly — which is what makes a room built out of these join up without anybody snapping anything. Floating-point extents that happen to be rounded are the version of this tool that everybody has used and nobody trusts.
Fields and properties (7)
public int XIts near corner along the work plane's first axis, in cells.
public int YDitto out of the plane.
public int ZDitto along its second axis.
public int WidthHow many cells across.
public int HeightHow many up.
public int DepthHow many along.
public bool IsEmptyWhether it encloses anything at all.
Methods (4)
public GridBox(int X, int Y, int Z, int Width, int Height, int Depth)A box measured in whole grid cells, which is what the cube-grid tool selects.
public static GridBox At(int x, int y, int z)A one-cell box at a cell.
public GridBox Sound()The same box with an extent brought back to at least one cell on every axis.
public GridBox Push(int axis, bool positive, int cells)The box grown or shrunk on one side, in cells.
Used by (3)
- BlockoutCreateTestsVixen.Editor.Blockout.Tests
- BlockoutCubeGridVixen.Editor.Blockout
- BlockoutModeVixen.Editor.Blockout