Struct dot_vox::Voxel[][src]

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

The X coordinate for the Voxel

The Y coordinate for the Voxel

The Z coordinate for the Voxel

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Copy for Voxel
[src]

impl Debug for Voxel
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Voxel
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

impl Send for Voxel

impl Sync for Voxel