pub trait AbstractRotation<T, const D: usize>:
PartialEq
+ ClosedMulAssign
+ Clonewhere
T: Scalar,{
// Required methods
fn identity() -> Self;
fn inverse(&self) -> Self;
fn inverse_mut(&mut self);
fn transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>,
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>;
fn transform_point(&self, p: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>;
fn inverse_transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<Const<D>>>::Buffer<T>>,
) -> Matrix<T, Const<D>, Const<1>, <DefaultAllocator as Allocator<Const<D>>>::Buffer<T>>;
fn inverse_transform_point(
&self,
p: &OPoint<T, Const<D>>,
) -> OPoint<T, Const<D>>;
// Provided method
fn inverse_transform_unit_vector(
&self,
v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>,
) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>> { ... }
}
Expand description
Trait implemented by rotations that can be used inside of an Isometry
or Similarity
.
Required Methods§
Sourcefn inverse_mut(&mut self)
fn inverse_mut(&mut self)
Change self
to its inverse.
Sourcefn transform_vector(
&self,
v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>,
) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
fn transform_vector( &self, v: &Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>, ) -> Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>
Apply the rotation to the given vector.
Sourcefn transform_point(&self, p: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
fn transform_point(&self, p: &OPoint<T, Const<D>>) -> OPoint<T, Const<D>>
Apply the rotation to the given point.
Provided Methods§
Sourcefn inverse_transform_unit_vector(
&self,
v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>,
) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
fn inverse_transform_unit_vector( &self, v: &Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>, ) -> Unit<Matrix<T, Const<D>, Const<1>, ArrayStorage<T, D, 1>>>
Apply the inverse rotation to the given unit vector.
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.