Public Member Functions | Protected Attributes | List of all members
vgl_rotation_3d< T > Class Template Reference

#include <vgl_algo_fwd.h>

Public Member Functions

 vgl_rotation_3d ()
 Construct the identity rotation. More...
 
 vgl_rotation_3d (vnl_quaternion< T > const &q)
 Construct from a quaternion. More...
 
 vgl_rotation_3d (T const &rx, T const &ry, T const &rz)
 Construct from Euler angles. More...
 
 vgl_rotation_3d (vnl_vector_fixed< T, 3 > const &rvector)
 Construct from a Rodrigues vector. More...
 
vgl_rotation_3doperator= (vnl_vector_fixed< T, 3 > const &rvector)
 Construct from a Rodrigues vector. More...
 
 vgl_rotation_3d (vnl_matrix_fixed< T, 3, 3 > const &matrix)
 Construct from a 3x3 rotation matrix. More...
 
vgl_rotation_3doperator= (vnl_matrix_fixed< T, 3, 3 > const &matrix)
 Construct from a 3x3 rotation matrix. More...
 
 vgl_rotation_3d (vgl_h_matrix_3d< T > const &h)
 Construct from a vgl_h_matrix_3d. More...
 
vgl_rotation_3doperator= (vgl_h_matrix_3d< T > const &h)
 Construct from a vgl_h_matrix_3d. More...
 
 vgl_rotation_3d (vnl_vector_fixed< T, 3 > const &a, vnl_vector_fixed< T, 3 > const &b)
 Construct to rotate (direction of) vector a to vector b. More...
 
 vgl_rotation_3d (vgl_vector_3d< T > const &a, vgl_vector_3d< T > const &b)
 Construct to rotate (direction of) vector a to vector b. More...
 
vnl_quaternion< T > as_quaternion () const
 Output unit quaternion. More...
 
vnl_vector_fixed< T, 3 > as_euler_angles () const
 Output Euler angles. More...
 
vnl_vector_fixed< T, 3 > as_rodrigues () const
 Output Rodrigues vector. More...
 
vnl_matrix_fixed< T, 3, 3 > as_matrix () const
 Output the matrix representation of this rotation in 3x3 form. More...
 
vgl_h_matrix_3d< T > as_h_matrix_3d () const
 Output the matrix representation of this rotation in 4x4 form. More...
 
vnl_vector_fixed< T, 3 > axis () const
 Returns the axis of rotation (unit vector). More...
 
double angle () const
 Returns the angle of rotation on the range [ 0 360 ] in radians. More...
 
vgl_rotation_3dset_identity ()
 Make the rotation the identity (i.e. no rotation). More...
 
vgl_rotation_3d< T > inverse () const
 The inverse rotation. More...
 
vgl_rotation_3d< T > transpose () const
 The transpose or conjugate of the rotation. More...
 
vgl_rotation_3d< T > operator * (vgl_rotation_3d< T > const &first_rotation) const
 Composition of two rotations. More...
 
vgl_homg_point_3d< T > operator * (vgl_homg_point_3d< T > const &p) const
 Rotate a homogeneous point. More...
 
vgl_homg_plane_3d< T > operator * (vgl_homg_plane_3d< T > const &p) const
 Rotate a homogeneous plane. More...
 
vgl_homg_line_3d_2_points< T > operator * (vgl_homg_line_3d_2_points< T > const &l) const
 Rotate a homogeneous line. More...
 
vgl_point_3d< T > operator * (vgl_point_3d< T > const &p) const
 Rotate a point. More...
 
vgl_plane_3d< T > operator * (vgl_plane_3d< T > const &p) const
 Rotate a plane. More...
 
vgl_line_3d_2_points< T > operator * (vgl_line_3d_2_points< T > const &l) const
 Rotate a line. More...
 
vgl_line_segment_3d< T > operator * (vgl_line_segment_3d< T > const &l) const
 Rotate a line segment. More...
 
vgl_vector_3d< T > operator * (vgl_vector_3d< T > const &v) const
 Rotate a vgl vector. More...
 
vnl_vector_fixed< T, 3 > operator * (vnl_vector_fixed< T, 3 > const &v) const
 Rotate a vnl vector. More...
 
bool operator== (vgl_rotation_3d< T > const &r) const
 comparison operator. More...
 

Protected Attributes

vnl_quaternion< T > q_
 The internal representation of the rotation is a quaternion. More...
 

Detailed Description

template<class T>
class vgl_rotation_3d< T >

Definition at line 26 of file vgl_algo_fwd.h.

Constructor & Destructor Documentation

◆ vgl_rotation_3d() [1/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( )
inline

Construct the identity rotation.

Definition at line 46 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [2/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vnl_quaternion< T > const &  q)
inline

Construct from a quaternion.

Definition at line 49 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [3/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( T const &  rx,
T const &  ry,
T const &  rz 
)
inline

Construct from Euler angles.

Definition at line 52 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [4/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vnl_vector_fixed< T, 3 > const &  rvector)
inlineexplicit

Construct from a Rodrigues vector.

Definition at line 55 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [5/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vnl_matrix_fixed< T, 3, 3 > const &  matrix)
inlineexplicit

Construct from a 3x3 rotation matrix.

Definition at line 76 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [6/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vgl_h_matrix_3d< T > const &  h)
inlineexplicit

Construct from a vgl_h_matrix_3d.

Definition at line 84 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [7/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vnl_vector_fixed< T, 3 > const &  a,
vnl_vector_fixed< T, 3 > const &  b 
)
inline

Construct to rotate (direction of) vector a to vector b.

The input vectors need not be of unit length

Definition at line 93 of file vgl_rotation_3d.h.

◆ vgl_rotation_3d() [8/8]

template<class T>
vgl_rotation_3d< T >::vgl_rotation_3d ( vgl_vector_3d< T > const &  a,
vgl_vector_3d< T > const &  b 
)
inline

Construct to rotate (direction of) vector a to vector b.

The input vectors need not be of unit length

Definition at line 131 of file vgl_rotation_3d.h.

Member Function Documentation

◆ angle()

template<class T>
double vgl_rotation_3d< T >::angle ( ) const
inline

Returns the angle of rotation on the range [ 0 360 ] in radians.

Definition at line 184 of file vgl_rotation_3d.h.

◆ as_euler_angles()

template<class T>
vnl_vector_fixed<T,3> vgl_rotation_3d< T >::as_euler_angles ( ) const
inline

Output Euler angles.

The first element is the rotation about the x-axis The second element is the rotation about the y-axis The third element is the rotation about the z-axis The total rotation is a composition of these rotations in this order

Definition at line 152 of file vgl_rotation_3d.h.

◆ as_h_matrix_3d()

template<class T>
vgl_h_matrix_3d<T> vgl_rotation_3d< T >::as_h_matrix_3d ( ) const
inline

Output the matrix representation of this rotation in 4x4 form.

Definition at line 175 of file vgl_rotation_3d.h.

◆ as_matrix()

template<class T>
vnl_matrix_fixed<T,3,3> vgl_rotation_3d< T >::as_matrix ( ) const
inline

Output the matrix representation of this rotation in 3x3 form.

Definition at line 169 of file vgl_rotation_3d.h.

◆ as_quaternion()

template<class T>
vnl_quaternion<T> vgl_rotation_3d< T >::as_quaternion ( ) const
inline

Output unit quaternion.

Definition at line 142 of file vgl_rotation_3d.h.

◆ as_rodrigues()

template<class T>
vnl_vector_fixed<T,3> vgl_rotation_3d< T >::as_rodrigues ( ) const
inline

Output Rodrigues vector.

The direction of this vector is the axis of rotation The length of this vector is the angle of rotation in radians

Definition at line 160 of file vgl_rotation_3d.h.

◆ axis()

template<class T>
vnl_vector_fixed<T,3> vgl_rotation_3d< T >::axis ( ) const
inline

Returns the axis of rotation (unit vector).

Definition at line 181 of file vgl_rotation_3d.h.

◆ inverse()

template<class T>
vgl_rotation_3d<T> vgl_rotation_3d< T >::inverse ( ) const
inline

The inverse rotation.

Definition at line 192 of file vgl_rotation_3d.h.

◆ operator *() [1/10]

template<class T>
vgl_rotation_3d<T> vgl_rotation_3d< T >::operator * ( vgl_rotation_3d< T > const &  first_rotation) const
inline

Composition of two rotations.

Definition at line 198 of file vgl_rotation_3d.h.

◆ operator *() [2/10]

template<class T>
vgl_homg_point_3d<T> vgl_rotation_3d< T >::operator * ( vgl_homg_point_3d< T > const &  p) const
inline

Rotate a homogeneous point.

Definition at line 204 of file vgl_rotation_3d.h.

◆ operator *() [3/10]

template<class T>
vgl_homg_plane_3d<T> vgl_rotation_3d< T >::operator * ( vgl_homg_plane_3d< T > const &  p) const
inline

Rotate a homogeneous plane.

Definition at line 211 of file vgl_rotation_3d.h.

◆ operator *() [4/10]

template<class T>
vgl_homg_line_3d_2_points<T> vgl_rotation_3d< T >::operator * ( vgl_homg_line_3d_2_points< T > const &  l) const
inline

Rotate a homogeneous line.

Definition at line 218 of file vgl_rotation_3d.h.

◆ operator *() [5/10]

template<class T>
vgl_point_3d<T> vgl_rotation_3d< T >::operator * ( vgl_point_3d< T > const &  p) const
inline

Rotate a point.

Definition at line 225 of file vgl_rotation_3d.h.

◆ operator *() [6/10]

template<class T>
vgl_plane_3d<T> vgl_rotation_3d< T >::operator * ( vgl_plane_3d< T > const &  p) const
inline

Rotate a plane.

Definition at line 232 of file vgl_rotation_3d.h.

◆ operator *() [7/10]

template<class T>
vgl_line_3d_2_points<T> vgl_rotation_3d< T >::operator * ( vgl_line_3d_2_points< T > const &  l) const
inline

Rotate a line.

Definition at line 239 of file vgl_rotation_3d.h.

◆ operator *() [8/10]

template<class T>
vgl_line_segment_3d<T> vgl_rotation_3d< T >::operator * ( vgl_line_segment_3d< T > const &  l) const
inline

Rotate a line segment.

Definition at line 246 of file vgl_rotation_3d.h.

◆ operator *() [9/10]

template<class T>
vgl_vector_3d<T> vgl_rotation_3d< T >::operator * ( vgl_vector_3d< T > const &  v) const
inline

Rotate a vgl vector.

Definition at line 253 of file vgl_rotation_3d.h.

◆ operator *() [10/10]

template<class T>
vnl_vector_fixed<T, 3> vgl_rotation_3d< T >::operator * ( vnl_vector_fixed< T, 3 > const &  v) const
inline

Rotate a vnl vector.

Definition at line 260 of file vgl_rotation_3d.h.

◆ operator=() [1/3]

template<class T>
vgl_rotation_3d& vgl_rotation_3d< T >::operator= ( vnl_vector_fixed< T, 3 > const &  rvector)
inline

Construct from a Rodrigues vector.

Definition at line 65 of file vgl_rotation_3d.h.

◆ operator=() [2/3]

template<class T>
vgl_rotation_3d& vgl_rotation_3d< T >::operator= ( vnl_matrix_fixed< T, 3, 3 > const &  matrix)
inline

Construct from a 3x3 rotation matrix.

Definition at line 80 of file vgl_rotation_3d.h.

◆ operator=() [3/3]

template<class T>
vgl_rotation_3d& vgl_rotation_3d< T >::operator= ( vgl_h_matrix_3d< T > const &  h)
inline

Construct from a vgl_h_matrix_3d.

Definition at line 88 of file vgl_rotation_3d.h.

◆ operator==()

template<class T>
bool vgl_rotation_3d< T >::operator== ( vgl_rotation_3d< T > const &  r) const
inline

comparison operator.

Definition at line 266 of file vgl_rotation_3d.h.

◆ set_identity()

template<class T>
vgl_rotation_3d& vgl_rotation_3d< T >::set_identity ( )
inline

Make the rotation the identity (i.e. no rotation).

Definition at line 189 of file vgl_rotation_3d.h.

◆ transpose()

template<class T>
vgl_rotation_3d<T> vgl_rotation_3d< T >::transpose ( ) const
inline

The transpose or conjugate of the rotation.

Definition at line 195 of file vgl_rotation_3d.h.

Member Data Documentation

◆ q_

template<class T>
vnl_quaternion<T> vgl_rotation_3d< T >::q_
protected

The internal representation of the rotation is a quaternion.

Definition at line 270 of file vgl_rotation_3d.h.


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