pub struct SpriteDense { /* private fields */ }Expand description
Dense occupancy + colour grid for one sprite frame, plus its pivot —
the decoded form the per-pixel raycaster marches. Built once from a
Kv6 (SpriteDense::from_kv6) or a voxel-clip VoxelFrame
(SpriteDense::from_voxel_frame); the latter lets an animated clip
cache every frame’s grid up front instead of rebuilding per frame.
Both sources store only surface voxels (a from-air ray’s first hit is the visible surface), so the grid is the visible hull.
Implementations§
Source§impl SpriteDense
impl SpriteDense
Sourcepub fn from_voxel_frame(
frame: &VoxelFrame,
dims: [u32; 3],
pivot: [f32; 3],
) -> Self
pub fn from_voxel_frame( frame: &VoxelFrame, dims: [u32; 3], pivot: [f32; 3], ) -> Self
Decode a voxel-clip VoxelFrame (dense-column layout) into the
dense grid, given the clip’s dims + pivot. The frame’s columns
are col = x + y*dims[0], each a per-column occupancy bitmask with
an ascending-z colour run — walked here into the raycaster’s
(x·my + y)·mz + z grid.
Auto Trait Implementations§
impl Freeze for SpriteDense
impl RefUnwindSafe for SpriteDense
impl Send for SpriteDense
impl Sync for SpriteDense
impl Unpin for SpriteDense
impl UnsafeUnpin for SpriteDense
impl UnwindSafe for SpriteDense
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more