Skip to content

GridSpec ​

Struct

Source: GridSpace.h

Description ​

Plain six-int aggregate describing a grid's origin, per-axis cell size, and extent (columns/rows). No member functions, no per-instance runtime state beyond these fields — a constexpr GridSpec costs zero SRAM.

Properties ​

NameTypeDescription
originXintWorld-space X of cell (0, 0)'s top-left corner, in pixels.
originYintWorld-space Y of cell (0, 0)'s top-left corner, in pixels.
cellWidthintCell width in pixels. MUST be >= 1 (see gridSpecIsValid()).
cellHeightintCell height in pixels. MUST be >= 1 (see gridSpecIsValid()).
colsintNumber of columns, for containsCell() bounds-checking.
rowsintNumber of rows, for containsCell() bounds-checking.

Released under the MIT License.