pub struct SelectionShape {
pub cube: bool,
pub sizes: [u8; 3],
pub xs: &'static [f64],
pub ys: &'static [f64],
pub zs: &'static [f64],
pub cells: &'static [u64],
pub empty: bool,
pub boxes: &'static [Aabb],
}Expand description
A block’s outline (selection) or interaction VoxelShape, block-local, as the crosshair ray
tests it (1.14+ versions; oracle selection_shapes.jsonl.gz).
The ray uses two views of a shape: the filled-cell grid (is the ray’s first test point inside
the shape?) and the box list (toAabbs() / getBoundingBoxes() in vanilla’s order, which
decides ties between equally near faces).
Fields§
§cube: boolVanilla’s cube shape class (CubeVoxelShape / SimpleVoxelShape): a coordinate’s cell is
floor(c * n) clamped to -1..=n; otherwise (array shapes) it is found by binary search
over the points.
sizes: [u8; 3]Cell counts [nx, ny, nz] (0, 0, 0 for the empty shape).
xs: &'static [f64]Cell boundaries along X (nx + 1 values; the empty shape has [0.0]).
ys: &'static [f64]Cell boundaries along Y.
zs: &'static [f64]Cell boundaries along Z.
cells: &'static [u64]Filled-cell bitset, bit index (x * ny + y) * nz + z, 64 bits per word.
empty: boolVoxelShape.isEmpty().
boxes: &'static [Aabb]The shape’s boxes in vanilla’s order.