Skip to main content

MatRotate3D

Trait MatRotate3D 

Source
pub trait MatRotate3D<T, V> {
    // Required methods
    fn from_x_rotation(theta: T) -> Self;
    fn from_y_rotation(theta: T) -> Self;
    fn from_rotation(axis: V, theta: T) -> Self;
    fn from_orthonormal_basis(normal: Vec3<T>) -> Self;
}
Expand description

trait for minimum of 3x3 matrices applying rotation to x, y or aribtrary 3D axes

Required Methods§

Source

fn from_x_rotation(theta: T) -> Self

create rotation about the x axis by theta radians

Source

fn from_y_rotation(theta: T) -> Self

create rotation about the y axis by theta radians

Source

fn from_rotation(axis: V, theta: T) -> Self

create rotation about the abitrary axis by theta radians

Source

fn from_orthonormal_basis(normal: Vec3<T>) -> Self

create an othonormal basis from the normal vector

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> MatRotate3D<T, Vec3<T>> for Mat3<T>
where T: Float + FloatOps<T> + SignedNumberOps<T>,

Source§

impl<T> MatRotate3D<T, Vec3<T>> for Mat4<T>
where T: Float + FloatOps<T> + SignedNumberOps<T>,

Source§

impl<T> MatRotate3D<T, Vec3<T>> for Mat34<T>
where T: Float + FloatOps<T> + SignedNumberOps<T>,