pub struct SpriteCutawayClip {
pub origin: [f32; 3],
pub inv_rows: [[f32; 3]; 3],
pub inv_vws: f32,
pub xy_lo: [f32; 2],
pub xy_hi: [f32; 2],
pub z_clip: f32,
}Expand description
CA.4 — one clipped grid’s cutaway volume for the sprite cull: the
footprint rule. An instance whose origin, mapped into the grid’s
local voxel frame, lands inside the grid’s XY chunk footprint with
z < z_clip is hidden this frame — dropped from the visible set,
which also stops it casting sprite shadows (the shadow pass marches
the culled visible set). Instances outside the footprint are never
affected. Built per frame by SceneRenderer::render_scene from the
per-grid world transforms + the resident chunk AABBs.
Fields§
§origin: [f32; 3]Grid world origin.
inv_rows: [[f32; 3]; 3]World→local rotation rows: local[i] = dot(inv_rows[i], w - origin)
(= the grid’s local→world rotation columns, reused as rows).
inv_vws: f321 / voxel_world_size — world offsets → voxel coords.
xy_lo: [f32; 2]XY footprint [lo, hi) of the grid’s resident chunks, voxel coords.
xy_hi: [f32; 2]See Self::xy_lo.
z_clip: f32The clip plane (crate::GridWorldTransform::z_clip), voxel z.
Trait Implementations§
Source§impl Clone for SpriteCutawayClip
impl Clone for SpriteCutawayClip
Source§fn clone(&self) -> SpriteCutawayClip
fn clone(&self) -> SpriteCutawayClip
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more