Struct dot_vox::Voxel [−][src]
A Voxel
A Voxel is a point in 3D space, with an indexed colour 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 1 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.
Methods
impl Voxel
[src]
impl Voxel
Trait Implementations
impl Clone for Voxel
[src]
impl Clone for Voxel
fn clone(&self) -> Voxel
[src]
fn clone(&self) -> Voxel
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for Voxel
[src]
impl Copy for Voxel
impl Debug for Voxel
[src]
impl Debug for Voxel
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Voxel
[src]
impl PartialEq for Voxel