geomc 1.0
A c++ linear algebra template library
Loading...
Searching...
No Matches
Rotation< T, 3 > Class Template Reference

3D rotation. More...

#include <geomc/linalg/Rotation.h>

Inheritance diagram for Rotation< T, 3 >:
Dimensional< T, 3 >

Public Types

using elem_t
 The coordinate type of this object.
 
using point_t
 The type of a point in this object's space.
 

Public Member Functions

 Rotation (const Quat< T > &q)
 
 Rotation (Vec< T, 3 > axis, T angle)
 
angle () const
 Return the angle component of the rotation.
 
Vec< T, 3 > apply_direction (const Vec< T, 3 > &v) const
 Apply to a direction vector (conforming to Transform concept)
 
Vec< T, 3 > apply_inverse_direction (const Vec< T, 3 > &v) const
 Apply inverse rotation to a direction vector (conforming to Transform concept)
 
Rotation< T, 3 > canonical () const
 
Rotation< T, 3 > exp () const
 
Rotation< T, 3 > inv () const
 Compute the inverse rotation.
 
Rotation< T, 3 > log () const
 
 operator AffineTransform< T, 3 > () const
 Cast to affine transform.
 
 operator Quat< T > () const
 Cast to quaternion.
 
 operator SimpleMatrix< T, 3, 3 > () const
 Represent this rotation as a matrix.
 
Rotation< T, 3 > operator* (const Rotation< T, 3 > &other) const
 Compose rotation.
 
Vec< T, 3 > operator* (const Vec< T, 3 > &v) const
 Apply to a 3D vector.
 
Rotation< T, 3 > & operator*= (const Rotation< T, 3 > &other)
 In-place compose rotation.
 
Rotation< T, 3 > & operator*= (T s)
 In-place scaling of a rotation.
 
Rotation< T, 3 > operator/ (const Rotation< T, 3 > &other) const
 Find the rotation that takes other to this.
 
Rotation< T, 3 > & operator/= (const Rotation< T, 3 > &other)
 In-place apply inverse.
 
AffineTransform< T, 3 > transform () const
 Represent as an affine transform.
 

Static Public Member Functions

static Rotation< T, 3 > align_vectors (const Vec< T, 3 > &dir, const Vec< T, 3 > &align_with)
 

Public Attributes

Quat< T > q
 

Static Public Attributes

static constexpr index_t N
 The dimension of this object.
 

Related Symbols

(Note that these are not member symbols.)

Rotation< T, 2 > mix (T s, const Rotation< T, 2 > &a, const Rotation< T, 2 > &b)
 Minimally interpolate two rotations.
 
Rotation< T, 2 > mix (T s, const Rotation< T, 2 > &a, const Rotation< T, 2 > &b)
 Minimally interpolate two rotations.
 
Rotation< T, 3 > mix (T s, const Rotation< T, 3 > &a, const Rotation< T, 3 > &b)
 Minimally interpolate two rotations.
 
Rotation< T, 3 > mix (T s, const Rotation< T, 3 > &a, const Rotation< T, 3 > &b)
 Minimally interpolate two rotations.
 
Isometry< T, Noperator* (const Isometry< T, N > &i, const Rotation< T, N > &r)
 Apply an isometry to a rotation.
 
Isometry< T, Noperator* (const Isometry< T, N > &i, const Rotation< T, N > &r)
 Apply an isometry to a rotation.
 
Rotation< T, 2 > operator* (const Rotation< T, 2 > &o, T s)
 Extend a rotation.
 
Rotation< T, 2 > operator* (const Rotation< T, 2 > &o, T s)
 Extend a rotation.
 
Rotation< T, 3 > operator* (const Rotation< T, 3 > &o, T s)
 Extend a rotation.
 
Rotation< T, 3 > operator* (const Rotation< T, 3 > &o, T s)
 Extend a rotation.
 
Isometry< T, Noperator* (const Rotation< T, N > &r, const Isometry< T, N > &i)
 Apply a rotation to an isometry.
 
Isometry< T, Noperator* (const Rotation< T, N > &r, const Isometry< T, N > &i)
 Apply a rotation to an isometry.
 
Similarity< T, Noperator* (const Rotation< T, N > &r, const Similarity< T, N > &i)
 Apply a rotation to a similarity.
 
Similarity< T, Noperator* (const Rotation< T, N > &r, const Similarity< T, N > &i)
 Apply a rotation to a similarity.
 
Similarity< T, Noperator* (const Similarity< T, N > &i, const Rotation< T, N > &r)
 Apply a similarity to a rotation.
 
Similarity< T, Noperator* (const Similarity< T, N > &i, const Rotation< T, N > &r)
 Apply a similarity to a rotation.
 
Rotation< T, 2 > operator* (T s, const Rotation< T, 2 > &o)
 Extend a rotation.
 
Rotation< T, 2 > operator* (T s, const Rotation< T, 2 > &o)
 Extend a rotation.
 
Rotation< T, 3 > operator* (T s, const Rotation< T, 3 > &o)
 Extend a rotation.
 
Rotation< T, 3 > operator* (T s, const Rotation< T, 3 > &o)
 Extend a rotation.
 
Vec< T, 2 > operator/ (const Vec< T, 2 > &v, const Rotation< T, 2 > &r)
 Apply the inverse of a rotation to a vector.
 
Vec< T, 2 > operator/ (const Vec< T, 2 > &v, const Rotation< T, 2 > &r)
 Apply the inverse of a rotation to a vector.
 
Vec< T, 3 > operator/ (const Vec< T, 3 > &v, const Rotation< T, 3 > &r)
 Apply the inverse of a rotation to a vector.
 
Vec< T, 3 > operator/ (const Vec< T, 3 > &v, const Rotation< T, 3 > &r)
 Apply the inverse of a rotation to a vector.
 

Detailed Description

template<typename T>
class geom::Rotation< T, 3 >

3D rotation.

See Rotation for a general description of rotations.

Member Typedef Documentation

◆ point_t

using point_t
inherited

The type of a point in this object's space.

An N-vector of T if N > 1, otherwise a T.

Member Function Documentation

◆ canonical()

template<typename T>
Rotation< T, 3 > canonical ( ) const
inline

Return a rotation with the same orientation, but with axis chosen so the rotation angle is in the range [0, π].


The documentation for this class was generated from the following files: