pub trait Rotation<const SIZE: usize>where
Self: Collection,{
const SIZE: usize = SIZE;
// Required methods
fn look_at<Dir, Up>(dir: &Dir, up: &Up) -> Self
where Dir: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
Up: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>;
fn between_vectors<A, B>(a: &A, b: &B) -> Self
where A: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
B: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>;
fn rotate_vector<V>(&self, vec: &mut V)
where V: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>;
fn invert(&self) -> Self;
}Expand description
Trait for representing and manipulating rotations.
This trait provides methods for creating and manipulating rotations, allowing for operations such as aligning vectors, rotating vectors, and inverting rotations.
Provided Associated Constants§
Required Methods§
Sourcefn look_at<Dir, Up>(dir: &Dir, up: &Up) -> Selfwhere
Dir: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
Up: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
fn look_at<Dir, Up>(dir: &Dir, up: &Up) -> Selfwhere
Dir: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
Up: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
Sourcefn between_vectors<A, B>(a: &A, b: &B) -> Selfwhere
A: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
B: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
fn between_vectors<A, B>(a: &A, b: &B) -> Selfwhere
A: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
B: VectorSpace<SIZE> + Collection<Scalar = <Self as Collection>::Scalar>,
Sourcefn rotate_vector<V>(&self, vec: &mut V)
fn rotate_vector<V>(&self, vec: &mut V)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.