Struct cgmath::Basis3 [] [src]

pub struct Basis3<S> {
    // some fields omitted
}

A three-dimensional rotation matrix.

The matrix is guaranteed to be orthogonal, so some operations, specifically inversion, can be implemented more efficiently than the implementations for math::Matrix3. To ensure orthogonality is maintained, the operations have been restricted to a subeset of those implemented on Matrix3.

Methods

impl<S: BaseFloat> Basis3<S>

fn from_quaternion(quaternion: &Quaternion<S>) -> Basis3<S>

Create a new rotation matrix from a quaternion.

Trait Implementations

impl<S: BaseFloat> From<Quaternion<S>> for Basis3<S>

fn from(quat: Quaternion<S>) -> Basis3<S>

impl<S> AsRef<Matrix3<S>> for Basis3<S>

fn as_ref(&self) -> &Matrix3<S>

impl<S: BaseFloat + 'static> Rotation<S, Vector3<S>, Point3<S>> for Basis3<S>

fn identity() -> Basis3<S>

fn look_at(dir: &Vector3<S>, up: &Vector3<S>) -> Basis3<S>

fn between_vectors(a: &Vector3<S>, b: &Vector3<S>) -> Basis3<S>

fn rotate_vector(&self, vec: &Vector3<S>) -> Vector3<S>

fn concat(&self, other: &Basis3<S>) -> Basis3<S>

fn concat_self(&mut self, other: &Basis3<S>)

fn invert(&self) -> Basis3<S>

fn invert_self(&mut self)

fn rotate_point(&self, point: &P) -> P

fn rotate_ray(&self, ray: &Ray<S, P, V>) -> Ray<S, P, V>

impl<S: BaseFloat> ApproxEq<S> for Basis3<S>

fn approx_eq_eps(&self, other: &Basis3<S>, epsilon: &S) -> bool

fn approx_epsilon(_hack: Option<Self>) -> T

fn approx_eq(&self, other: &Self) -> bool

impl<S: BaseFloat + 'static> Rotation3<S> for Basis3<S>

fn from_axis_angle(axis: &Vector3<S>, angle: Rad<S>) -> Basis3<S>

fn from_euler(x: Rad<S>, y: Rad<S>, z: Rad<S>) -> Basis3<S>

fn from_angle_x(theta: Rad<S>) -> Basis3<S>

fn from_angle_y(theta: Rad<S>) -> Basis3<S>

fn from_angle_z(theta: Rad<S>) -> Basis3<S>

Derived Implementations

impl<S: Decodable> Decodable for Basis3<S>

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Basis3<S>, __D::Error>

impl<S: Encodable> Encodable for Basis3<S>

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl<S: Clone> Clone for Basis3<S>

fn clone(&self) -> Basis3<S>

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

impl<S: Copy> Copy for Basis3<S>

impl<S: PartialEq> PartialEq for Basis3<S>

fn eq(&self, __arg_0: &Basis3<S>) -> bool

fn ne(&self, __arg_0: &Basis3<S>) -> bool