pub struct Voxel {
pub x: u8,
pub y: u8,
pub z: u8,
pub i: u8,
}
Expand description
A voxel.
A point in 3D space, with an indexed color attached.
Fields§
§x: u8
The X coordinate for the voxel.
y: u8
The Y coordinate for the voxel.
z: u8
The Z coordinate for the voxel.
i: u8
Index in the color palette. Note that this will be oen less than the value stored in the source file, as the palette indices run from 1–255, whereas in memory the indices run from 0–254. Therefore, to make life easier, we store the in-memory index here. Should you require the source file’s indices, simply add 1 to this value.
Trait Implementations§
impl Copy for Voxel
impl Eq for Voxel
impl StructuralPartialEq for Voxel
Auto Trait Implementations§
impl Freeze for Voxel
impl RefUnwindSafe for Voxel
impl Send for Voxel
impl Sync for Voxel
impl Unpin for Voxel
impl UnwindSafe for Voxel
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