Trait rapier3d::utils::SimdBasis

source ·
pub trait SimdBasis: Sized {
    type Basis;

    // Required methods
    fn orthonormal_basis(self) -> Self::Basis;
    fn orthonormal_vector(self) -> Self;
}
Expand description

Trait to compute the orthonormal basis of a vector.

Required Associated Types§

source

type Basis

The type of the array of orthonormal vectors.

Required Methods§

source

fn orthonormal_basis(self) -> Self::Basis

Computes the vectors which, when combined with self, form an orthonormal basis.

source

fn orthonormal_vector(self) -> Self

Computes a vector orthogonal to self with a unit length (if self has a unit length).

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<N: SimdRealCopy + SimdSign<N>> SimdBasis for Vector3<N>

§

type Basis = [Matrix<N, Const<3>, Const<1>, ArrayStorage<N, 3, 1>>; 2]

source§

fn orthonormal_basis(self) -> [Vector3<N>; 2]

source§

fn orthonormal_vector(self) -> Vector3<N>

source§

impl<N: SimdRealCopy> SimdBasis for Vector2<N>

§

type Basis = [Matrix<N, Const<2>, Const<1>, ArrayStorage<N, 2, 1>>; 1]

source§

fn orthonormal_basis(self) -> [Vector2<N>; 1]

source§

fn orthonormal_vector(self) -> Vector2<N>

Implementors§