Trait heron::rapier_plugin::rapier::utils::WBasis [−]
pub trait WBasis { type Basis; pub fn orthonormal_basis(self) -> Self::Basis; pub fn orthonormal_vector(self) -> Self; }
Trait to compute the orthonormal basis of a vector.
Associated Types
type Basis
The type of the array of orthonormal vectors.
Required methods
pub fn orthonormal_basis(self) -> Self::Basis
Computes the vectors which, when combined with self
, form an orthonormal basis.
pub fn orthonormal_vector(self) -> Self
Computes a vector orthogonal to self
with a unit length (if self
has a unit length).
Implementors
impl<N> WBasis for Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>> where
N: SimdRealField,
N: SimdRealField,
type Basis = [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>; 1]
pub fn orthonormal_basis(
self
) -> [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>; 1]
self
) -> [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>; 1]
pub fn orthonormal_vector(
self
) -> Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
self
) -> Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 2_usize, 1_usize>>
impl<N> WBasis for Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>> where
N: SimdRealField + WSign<N>,
N: SimdRealField + WSign<N>,
type Basis = [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>>; 2]
pub fn orthonormal_basis(
self
) -> [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>>; 2]
self
) -> [Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>>; 2]
pub fn orthonormal_vector(
self
) -> Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>>
self
) -> Matrix<N, Const<{_: usize}>, Const<1_usize>, ArrayStorage<N, 3_usize, 1_usize>>