Enum gfx_voxel::cube::Face [] [src]

pub enum Face {
    Down,
    Up,
    North,
    South,
    West,
    East,
}

A value representing face direction.

Variants

Down

Facing down.

Up

Facing up.

North

Facing north.

South

Facing south.

West

Facing west.

East

Facing east.

Methods

impl Face
[src]

fn vertices(self, base: Vector3<f32>, scale: Vector3<f32>) -> [Vector3<f32>; 4]

Computes vertices of the face.

fn direction(self) -> [i32; 3]

Gets the direction of face.

fn from_direction(d: [i32; 3]) -> Option<Self>

Gets the face in a specific direction.

fn from_usize(number: usize) -> Option<Self>

Convert number to face.

Trait Implementations

impl Debug for Face
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Ord for Face
[src]

fn cmp(&self, __arg_0: &Face) -> Ordering

This method returns an Ordering between self and other. Read more

impl Eq for Face
[src]

impl PartialOrd for Face
[src]

fn partial_cmp(&self, __arg_0: &Face) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, other: &Rhs) -> bool
1.0.0

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, other: &Rhs) -> bool
1.0.0

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, other: &Rhs) -> bool
1.0.0

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for Face
[src]

fn eq(&self, __arg_0: &Face) -> bool

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

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Clone for Face
[src]

fn clone(&self) -> Face

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Copy for Face
[src]

impl FromStr for Face
[src]

type Err = ParseError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<Self, Self::Err>

Parses a string s to return a value of this type. Read more