Skip to main content

OrthonormalBasis

Trait OrthonormalBasis 

Source
pub trait OrthonormalBasis: 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).

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.

Implementations on Foreign Types§

Source§

impl<N: SimdRealCopy + CopySign<N>> OrthonormalBasis for Vector3<N>

Source§

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> OrthonormalBasis for Vector2<N>

Source§

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§

Source§

impl OrthonormalBasis for Vector

Available on crate feature dim2 only.
Source§

type Basis = [Vec2; 1]