Function CE::Assets::Grids::make_geometry

Function Documentation

GeometryData CE::Assets::Grids::make_geometry(const Definition &grid, CE::Rendering::Geometry::Pivot pivot, CE::Rendering::Geometry::PixelSize texture_size)

Declaration: [[nodiscard]]

Build local Y-up cell strips and normalized texture coordinates on the CPU.

See also

Detailed guide

Parameters:
  • grid – Row-major pixel cells/spacing with representable count and occupied-edge arithmetic.

  • pivot – Finite normalized top-left-origin pivot applied separately to every cell.

  • texture_size – Nonzero image width/height in pixels.

Returns:

Owned temporary vertices, four per cell; upload each selected cell as an independent strip. Empty texture, out-of-image bounds or excessive vertex count reject before pooled vertex allocation. Invalid pivots and unrepresentable cell coordinates also reject; allocation failures propagate. This creates no graphics resource and publishes no cache entry.