[][src]Struct dot_vox::Voxel

pub struct Voxel {
    pub x: u8,
    pub y: u8,
    pub z: u8,
    pub i: u8,
}

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.

Trait Implementations

impl Clone for Voxel[src]

impl Copy for Voxel[src]

impl Debug for Voxel[src]

impl PartialEq<Voxel> for Voxel[src]

impl StructuralPartialEq for Voxel[src]

Auto Trait Implementations

impl RefUnwindSafe for Voxel

impl Send for Voxel

impl Sync for Voxel

impl Unpin for Voxel

impl UnwindSafe for Voxel

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.