Enum bvh::axis::Axis
[−]
[src]
pub enum Axis { X, Y, Z, }
An Axis
in a three-dimensional coordinate system.
Used to access Vector3
/Point3
structs via index.
Examples
use bvh::axis::Axis; let mut position = [1.0, 0.5, 42.0]; position[Axis::Y] *= 4.0; assert_eq!(position[Axis::Y], 2.0);
nalgebra
structures are also indexable using Axis
.
For reference see the documentation.
extern crate bvh; extern crate nalgebra; use bvh::axis::Axis; use nalgebra::Point3; let mut position: Point3<f32> = Point3::new(1.0, 2.0, 3.0); position[Axis::X] = 1000.0; assert_eq!(position[Axis::X], 1000.0);
Variants
X
Index of the X axis.
Y
Index of the Y axis.
Z
Index of the Z axis.
Trait Implementations
impl Debug for Axis
[src]
impl Copy for Axis
[src]
impl Clone for Axis
[src]
fn clone(&self) -> Axis
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 PartialEq for Axis
[src]
fn eq(&self, __arg_0: &Axis) -> 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 Display for Axis
[src]
Display implementation for Axis
.