Struct nalgebra::Rotation3
[−]
[src]
pub struct Rotation3<N> { /* fields omitted */ }
Three dimensional rotation matrix.
Methods
impl<N: Clone + BaseFloat> Rotation3<N>
[src]
fn new(axisangle: Vector3<N>) -> Rotation3<N>
Builds a 3 dimensional rotation matrix from an axis and an angle.
Arguments
axisangle
- A vector representing the rotation. Its magnitude is the amount of rotation in radian. Its direction is the axis of rotation.
unsafe fn new_with_matrix(matrix: Matrix3<N>) -> Rotation3<N>
Builds a rotation matrix from an orthogonal matrix.
This is unsafe because the orthogonality of matrix
is not checked.
fn new_with_euler_angles(roll: N, pitch: N, yaw: N) -> Rotation3<N>
Creates a new rotation from Euler angles.
The primitive rotations are applied in order: 1 roll − 2 pitch − 3 yaw.
impl<N: Clone + BaseFloat> Rotation3<N>
[src]
fn new_observer_frame(dir: &Vector3<N>, up: &Vector3<N>) -> Rotation3<N>
Creates a rotation that corresponds to the local frame of an observer standing at the
origin and looking toward dir
.
It maps the view direction dir
to the positive z
axis.
Arguments
- dir - The look direction, that is, direction the matrix
z
axis will be aligned with. - up - The vertical direction. The only requirement of this parameter is to not be
collinear
to
dir
. Non-collinearity is not checked.
fn look_at_rh(dir: &Vector3<N>, up: &Vector3<N>) -> Rotation3<N>
Builds a right-handed look-at view matrix without translation.
This conforms to the common notion of right handed look-at matrix from the computer graphics community.
Arguments
- eye - The eye position.
- target - The target position.
- up - A vector approximately aligned with required the vertical axis. The only
requirement of this parameter is to not be collinear to
target - eye
.
fn look_at_lh(dir: &Vector3<N>, up: &Vector3<N>) -> Rotation3<N>
Builds a left-handed look-at view matrix without translation.
This conforms to the common notion of left handed look-at matrix from the computer graphics community.
Arguments
- eye - The eye position.
- target - The target position.
- up - A vector approximately aligned with required the vertical axis. The only
requirement of this parameter is to not be collinear to
target - eye
.
impl<N> Rotation3<N>
[src]
Trait Implementations
impl<N: Eq> Eq for Rotation3<N>
[src]
impl<N: PartialEq> PartialEq for Rotation3<N>
[src]
fn eq(&self, __arg_0: &Rotation3<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Rotation3<N>) -> bool
This method tests for !=
.
impl<N: Encodable> Encodable for Rotation3<N>
[src]
impl<N: Decodable> Decodable for Rotation3<N>
[src]
impl<N: Clone> Clone for Rotation3<N>
[src]
fn clone(&self) -> Rotation3<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<N: Debug> Debug for Rotation3<N>
[src]
impl<N: Hash> Hash for Rotation3<N>
[src]
fn hash<__HN: Hasher>(&self, __arg_0: &mut __HN)
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher
1.3.0
Feeds a slice of this type into the state provided.
impl<N: Copy> Copy for Rotation3<N>
[src]
impl<N: Clone + BaseFloat + Cast<f64>> Rotation<Vector3<N>> for Rotation3<N>
[src]
fn rotation(&self) -> Vector3<N>
Gets the rotation associated with self
.
fn inverse_rotation(&self) -> Vector3<N>
Gets the inverse rotation associated with self
.
fn append_rotation_mut(&mut self, rotation: &Vector3<N>)
Appends a rotation to this object.
fn append_rotation(&self, axisangle: &Vector3<N>) -> Rotation3<N>
Appends the rotation amount
to a copy of t
.
fn prepend_rotation_mut(&mut self, rotation: &Vector3<N>)
Prepends a rotation to this object.
fn prepend_rotation(&self, axisangle: &Vector3<N>) -> Rotation3<N>
Prepends the rotation amount
to a copy of t
.
fn set_rotation(&mut self, axisangle: Vector3<N>)
Sets the rotation of self
.
impl<N: BaseFloat> RotationTo for Rotation3<N>
[src]
type AngleType = N
Type of the angle between two elements.
type DeltaRotationType = Rotation3<N>
Type of the rotation between two elements.
fn angle_to(&self, other: &Self) -> N
Computes an angle nedded to transform the first element to the second one using a rotation. Read more
fn rotation_to(&self, other: &Self) -> Rotation3<N>
Computes the smallest rotation needed to transform the first element to the second one.
impl<N: Clone + Rand + BaseFloat> Rand for Rotation3<N>
[src]
fn rand<R: Rng>(rng: &mut R) -> Rotation3<N>
Generates a random instance of this type using the specified source of randomness. Read more
impl<N: BaseFloat> AbsoluteRotate<Vector3<N>> for Rotation3<N>
[src]
fn absolute_rotate(&self, v: &Vector3<N>) -> Vector3<N>
This is the same as: Read more
impl<N: BaseNum> Rotate<Vector3<N>> for Rotation3<N>
[src]
fn rotate(&self, v: &Vector3<N>) -> Vector3<N>
Applies a rotation to v
.
fn inverse_rotate(&self, v: &Vector3<N>) -> Vector3<N>
Applies an inverse rotation to v
.
impl<N: BaseNum> Rotate<Point3<N>> for Rotation3<N>
[src]
fn rotate(&self, p: &Point3<N>) -> Point3<N>
Applies a rotation to v
.
fn inverse_rotate(&self, p: &Point3<N>) -> Point3<N>
Applies an inverse rotation to v
.
impl<N: BaseNum> Transform<Vector3<N>> for Rotation3<N>
[src]
fn transform(&self, v: &Vector3<N>) -> Vector3<N>
Applies a transformation to v
.
fn inverse_transform(&self, v: &Vector3<N>) -> Vector3<N>
Applies an inverse transformation to v
.
impl<N: BaseNum> Transform<Point3<N>> for Rotation3<N>
[src]
fn transform(&self, p: &Point3<N>) -> Point3<N>
Applies a transformation to v
.
fn inverse_transform(&self, p: &Point3<N>) -> Point3<N>
Applies an inverse transformation to v
.
impl<N> Dimension for Rotation3<N>
[src]
impl<N: BaseNum> Mul<Rotation3<N>> for Rotation3<N>
[src]
type Output = Rotation3<N>
The resulting type after applying the *
operator
fn mul(self, right: Rotation3<N>) -> Rotation3<N>
The method for the *
operator
impl<N: Copy + BaseNum> MulAssign<Rotation3<N>> for Rotation3<N>
[src]
fn mul_assign(&mut self, right: Rotation3<N>)
The method for the *=
operator
impl<N: BaseNum> Mul<Vector3<N>> for Rotation3<N>
[src]
type Output = Vector3<N>
The resulting type after applying the *
operator
fn mul(self, right: Vector3<N>) -> Vector3<N>
The method for the *
operator
impl<N: BaseNum> Mul<Point3<N>> for Rotation3<N>
[src]
type Output = Point3<N>
The resulting type after applying the *
operator
fn mul(self, right: Point3<N>) -> Point3<N>
The method for the *
operator
impl<N: BaseNum> One for Rotation3<N>
[src]
impl<N: BaseNum> Eye for Rotation3<N>
[src]
fn new_identity(dimension: usize) -> Rotation3<N>
Return the identity matrix of specified dimension
impl<N: Zero + BaseNum + Cast<f64> + BaseFloat> RotationMatrix<N, Vector3<N>, Vector3<N>> for Rotation3<N>
[src]
type Output = Rotation3<N>
The output rotation matrix type.
fn to_rotation_matrix(&self) -> Rotation3<N>
Gets the rotation matrix represented by self
.
impl<N: Copy + Zero> Column<Vector3<N>> for Rotation3<N>
[src]
fn ncols(&self) -> usize
The number of column of this matrix or vector.
fn column(&self, i: usize) -> Vector3<N>
Reads the i
-th column of self
.
fn set_column(&mut self, i: usize, column: Vector3<N>)
Writes the i
-th column of self
.
impl<N: Copy + Zero> Row<Vector3<N>> for Rotation3<N>
[src]
fn nrows(&self) -> usize
The number of column of self
.
fn row(&self, i: usize) -> Vector3<N>
Reads the i
-th row of self
.
fn set_row(&mut self, i: usize, row: Vector3<N>)
Writes the i
-th row of self
.
impl<N> Index<(usize, usize)> for Rotation3<N>
[src]
type Output = N
The returned type after indexing
fn index(&self, i: (usize, usize)) -> &N
The method for the indexing (Foo[Bar]
) operation
impl<N: Absolute<N>> Absolute<Matrix3<N>> for Rotation3<N>
[src]
fn abs(m: &Rotation3<N>) -> Matrix3<N>
Computes some absolute value of this object. Typically, this will make all component of a matrix or vector positive. Read more
impl<N: BaseNum> ToHomogeneous<Matrix4<N>> for Rotation3<N>
[src]
fn to_homogeneous(&self) -> Matrix4<N>
Gets the homogeneous coordinates form of this object.
impl<N: Copy> Inverse for Rotation3<N>
[src]
fn inverse_mut(&mut self) -> bool
In-place version of inverse
.
fn inverse(&self) -> Option<Rotation3<N>>
Returns the inverse of m
.
impl<N: Copy> Transpose for Rotation3<N>
[src]
fn transpose(&self) -> Rotation3<N>
Computes the transpose of a matrix.
fn transpose_mut(&mut self)
In-place version of transposed
.
impl<N: ApproxEq<N>> ApproxEq<N> for Rotation3<N>
[src]
fn approx_epsilon(_: Option<Rotation3<N>>) -> N
Default epsilon for approximation.
fn approx_ulps(_: Option<Rotation3<N>>) -> u32
Default ULPs for approximation.
fn approx_eq(&self, other: &Rotation3<N>) -> bool
Tests approximate equality.
fn approx_eq_eps(&self, other: &Rotation3<N>, epsilon: &N) -> bool
Tests approximate equality using a custom epsilon.
fn approx_eq_ulps(&self, other: &Rotation3<N>, ulps: u32) -> bool
Tests approximate equality using units in the last place (ULPs)
impl<N: Copy + Zero> Diagonal<Vector3<N>> for Rotation3<N>
[src]
fn from_diagonal(diagonal: &Vector3<N>) -> Rotation3<N>
Creates a new matrix with the given diagonal.
fn diagonal(&self) -> Vector3<N>
The diagonal of this matrix.
impl<N: Display + BaseFloat> Display for Rotation3<N>
[src]
impl<N: BaseFloat> Mul<Isometry3<N>> for Rotation3<N>
[src]
type Output = Isometry3<N>
The resulting type after applying the *
operator
fn mul(self, right: Isometry3<N>) -> Isometry3<N>
The method for the *
operator
impl<N: BaseFloat> Mul<Similarity3<N>> for Rotation3<N>
[src]
type Output = Similarity3<N>
The resulting type after applying the *
operator
fn mul(self, right: Similarity3<N>) -> Similarity3<N>
The method for the *
operator