Type Definition nalgebra::geometry::Rotation2
[−]
[src]
type Rotation2<N> = Rotation<N, U2>;
A 2-dimensional rotation matrix.
Methods
impl<N: Real> Rotation2<N>
[src]
fn new(angle: N) -> Self
[src]
Builds a 2 dimensional rotation matrix from an angle in radian.
fn from_scaled_axis<SB: Storage<N, U1>>(axisangle: Vector<N, U1, SB>) -> Self
[src]
Builds a 2 dimensional rotation matrix from an angle in radian wrapped in a 1-dimensional vector.
Equivalent to Self::new(axisangle[0])
.
fn rotation_between<SB, SC>(
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The rotation matrix required to align a
and b
but with its angl.
This is the rotation R
such that (R * a).angle(b) == 0 && (R * a).dot(b).is_positive()
.
fn scaled_rotation_between<SB, SC>(
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
[src]
a: &Vector<N, U2, SB>,
b: &Vector<N, U2, SC>,
s: N
) -> Self where
SB: Storage<N, U2>,
SC: Storage<N, U2>,
The smallest rotation needed to make a
and b
collinear and point toward the same
direction, raised to the power s
.
impl<N: Real> Rotation2<N>
[src]
fn angle(&self) -> N
[src]
The rotation angle.
fn angle_to(&self, other: &Rotation2<N>) -> N
[src]
The rotation angle needed to make self
and other
coincide.
fn rotation_to(&self, other: &Rotation2<N>) -> Rotation2<N>
[src]
The rotation matrix needed to make self
and other
coincide.
The result is such that: self.rotation_to(other) * self == other
.
fn powf(&self, n: N) -> Rotation2<N>
[src]
Raise the quaternion to a given floating power, i.e., returns the rotation with the angle
of self
multiplied by n
.
fn scaled_axis(&self) -> VectorN<N, U1>
[src]
The rotation angle returned as a 1-dimensional vector.
Trait Implementations
impl<N1, N2> SubsetOf<UnitComplex<N2>> for Rotation2<N1> where
N1: Real,
N2: Real + SupersetOf<N1>,
[src]
N1: Real,
N2: Real + SupersetOf<N1>,
fn to_superset(&self) -> UnitComplex<N2>
[src]
The inclusion map: converts self
to the equivalent element of its superset.
fn is_in_subset(q: &UnitComplex<N2>) -> bool
[src]
Checks if element
is actually part of the subset Self
(and can be converted to it).
unsafe fn from_superset_unchecked(q: &UnitComplex<N2>) -> Self
[src]
Use with care! Same as self.to_superset
but without any property checks. Always succeeds.
fn from_superset(element: &T) -> Option<Self>
[src]
The inverse inclusion map: attempts to construct self
from the equivalent element of its superset. Read more