[−][src]Enum smallpt::axis::Axis
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]
(http://nalgebra.org/doc/nalgebra/struct.Vector3.html#method.index).
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
Index of the X axis.
Index of the Y axis.
Index of the Z axis.
Trait Implementations
impl Clone for Axis
[src]
impl Copy for Axis
[src]
impl Debug for Axis
[src]
impl Display for Axis
[src]
Display implementation for Axis
.
impl Index<Axis> for Point<f32, U3>
[src]
Make Point3
indexable by Axis
.
impl Index<Axis> for [f32]
[src]
Make slices indexable by Axis
.
impl IndexMut<Axis> for [f32]
[src]
Make slices mutably accessible by Axis
.
impl IndexMut<Axis> for Point<f32, U3>
[src]
Make Point3
mutably accessible by Axis
.
impl PartialEq<Axis> for Axis
[src]
impl StructuralPartialEq for Axis
[src]
Auto Trait Implementations
impl RefUnwindSafe for Axis
impl Send for Axis
impl Sync for Axis
impl Unpin for Axis
impl UnwindSafe for Axis
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> Scalar for T where
T: PartialEq<T> + Copy + Any + Debug,
[src]
T: PartialEq<T> + Copy + Any + Debug,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn is_in_subset(&self) -> bool
unsafe fn to_subset_unchecked(&self) -> SS
fn from_subset(element: &SS) -> SP
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,