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

2D rotation. More...

#include <geomc/linalg/Rotation.h>

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

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 (T radians)
 
angle () const
 Return the angle component of the rotation.
 
Vec< T, 2 > apply_direction (const Vec< T, 2 > &v) const
 Apply to a direction vector (conorming to Transform concept)
 
Vec< T, 2 > apply_inverse_direction (const Vec< T, 2 > &v) const
 Apply inverse rotation to a direction vector (conforming to Transform concept)
 
Rotation< T, 2 > canonical () const
 
Rotation< T, 2 > exp () const
 
Rotation< T, 2 > inv () const
 Compute the inverse rotation.
 
Rotation< T, 2 > log () const
 
 operator AffineTransform< T, 2 > () const
 Cast to affine transform.
 
 operator Rotation< T, 3 > () const
 Cast to a 3D rotation.
 
template<typename U>
 operator Rotation< U, 2 > () const
 Cast the underlying coordinate type.
 
template<typename U>
 operator Rotation< U, 3 > () const
 Cast to a 3D rotation and change the coordinate type.
 
 operator SimpleMatrix< T, 2, 2 > () const
 Represent this rotation as a matrix.
 
 operator std::complex< T > () const
 Cast to complex number.
 
Rotation< T, 2 > operator* (const Rotation< T, 2 > &other) const
 Compose rotation.
 
Vec< T, 2 > operator* (const Vec< T, 2 > &v) const
 Apply to a 2D vector.
 
Rotation< T, 2 > & operator*= (const Rotation< T, 2 > &other)
 In-place compose rotation.
 
Rotation< T, 2 > & operator*= (T s)
 In-place scaling of a rotation.
 
Rotation< T, 2 > operator/ (const Rotation< T, 2 > &other) const
 Find the rotation that takes other to this.
 
Rotation< T, 2 > & operator/= (const Rotation< T, 2 > &other)
 In-place apply inverse.
 
AffineTransform< T, 2 > transform () const
 Represent as an affine transform.
 

Static Public Member Functions

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

Public Attributes

radians
 

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, 2 >

2D 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, 2 > canonical ( ) const
inline

Return a rotation with the same orientation, but normalized to the rotation angle range [0, 2π).


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