![]() |
Rosetta Utilities
2015.25
|
Rigid body 3-D position/transform. More...
#include <BodyPosition.hh>
Public Types | |
| typedef T | Value |
| typedef T & | Reference |
| typedef T const & | ConstReference |
| typedef T * | Pointer |
| typedef T const * | ConstPointer |
| typedef T | value_type |
| typedef T & | reference |
| typedef T const & | const_reference |
| typedef T * | pointer |
| typedef T const * | const_pointer |
| typedef NumericTraits< T > | Traits |
| typedef xyzVector< T > | Axis |
| typedef xyzVector< T > | Point |
| typedef xyzVector< T > | Vector |
| typedef xyzVector< T > | Translation |
| typedef xyzMatrix< T > | Rotation |
| typedef numeric::Quaternion< T > | Quaternion |
Public Member Functions | |
| BodyPosition () | |
| Default constructor. More... | |
| BodyPosition (Rotation const &R_a, Translation const &t_a) | |
| Rotation + Translation constructor. More... | |
| BodyPosition (Rotation const &R_a) | |
| Rotation constructor. More... | |
| BodyPosition (Quaternion const &q_a, Translation const &t_a) | |
| Quaternion + Translation constructor. More... | |
| BodyPosition (Quaternion const &q_a) | |
| Quaternion constructor. More... | |
| BodyPosition (Point const &, Vector const &x1, Vector const &u1, Point const &, Vector const &x2, Vector const &u2, Value const &cos, Value const &sin, Value const &csc) | |
| Point + Vector constructor. More... | |
| BodyPosition (BodyPosition const &bp) | |
| Copy constructor. More... | |
| ~BodyPosition () | |
| Destructor. More... | |
| BodyPosition & | operator= (BodyPosition const &bp) |
| Copy assignment. More... | |
| Rotation const & | R () const |
| Rotation. More... | |
| Quaternion const & | q () const |
| Quaternion. More... | |
| Translation const & | t () const |
| Translation. More... | |
| Value | angle () const |
| Principal angle of rotation (on [0,2*pi]) More... | |
| Axis | axis () const |
| Axis of Rotation unit vector (direction for angle on [0,2*pi]) More... | |
| Axis & | axis (Axis &u) const |
| Axis of rotation unit vector: Passed vector (direction for angle on [0,2*pi]) More... | |
| BodyPosition const & | operator() (Point &p) const |
| Transform a Point. More... | |
| BodyPosition const & | transform (Point &p) const |
| Transform a Point. More... | |
| BodyPosition const & | inverse_transform (Point &p) const |
| Inverse transform a Point. More... | |
| BodyPosition & | normalize () |
| Normalize. More... | |
| BodyPosition & | normalize_if_needed (Value const &tol=Traits::quaternion_tolerance()) |
| Normalize if magnitude squared error exceeds tolerance. More... | |
| BodyPosition & | to_identity () |
| Identity. More... | |
| BodyPosition & | invert () |
| Invert. More... | |
| BodyPosition & | apply (BodyPosition const &p, bool const precise=true) |
| Apply a successive BodyPosition transformation. More... | |
| BodyPosition & | left_transform_by (BodyPosition const &p, bool const precise=true) |
| Left transform by a BodyPosition. More... | |
| BodyPosition & | right_transform_by (BodyPosition const &p, bool const precise=true) |
| Right transform by a BodyPosition. More... | |
| BodyPosition & | left_transform_by_inverse_of (BodyPosition const &p, bool const precise=true) |
| Left transform by the inverse of a BodyPosition. More... | |
| BodyPosition & | right_transform_by_inverse_of (BodyPosition const &p, bool const precise=true) |
| Right transform by the inverse of a BodyPosition. More... | |
| BodyPosition | inverse () const |
| Inverse. More... | |
| Point | transformed (Point const &p) const |
| Transformed Point. More... | |
| Point | inverse_transformed (Point const &p) const |
| Inverse transformed Point. More... | |
| Translation | inverse_translation () const |
| Inverse translation. More... | |
Static Public Member Functions | |
| static BodyPosition | identity () |
| Identity named constructor. More... | |
| static BodyPosition const & | I () |
| Identity BodyPosition for expressions. More... | |
Private Member Functions | |
| BodyPosition const & | R_refresh (bool const precise=true) const |
| Refresh rotation matrix from Quaternion. More... | |
| BodyPosition const & | q_refresh (bool const precise=true) const |
| Refresh Quaternion from rotation matrix. More... | |
Private Attributes | |
| Rotation | R_ |
| Rotation matrix. More... | |
| bool | R_fresh_ |
| Rotation matrix status. More... | |
| Quaternion | q_ |
| Quaternion. More... | |
| bool | q_fresh_ |
| Quaternion status. More... | |
| Translation | t_ |
| Translation. More... | |
Friends | |
| bool | operator== (BodyPosition const &p1, BodyPosition const &p2) |
| BodyPosition == BodyPosition. More... | |
| bool | operator!= (BodyPosition const &p1, BodyPosition const &p2) |
| BodyPosition != BodyPosition. More... | |
Rigid body 3-D position/transform.
| typedef xyzVector< T > numeric::BodyPosition< typename >::Axis |
| typedef T const* numeric::BodyPosition< typename >::const_pointer |
| typedef T const& numeric::BodyPosition< typename >::const_reference |
| typedef T const* numeric::BodyPosition< typename >::ConstPointer |
| typedef T const& numeric::BodyPosition< typename >::ConstReference |
| typedef xyzVector< T > numeric::BodyPosition< typename >::Point |
| typedef T* numeric::BodyPosition< typename >::Pointer |
| typedef T* numeric::BodyPosition< typename >::pointer |
| typedef numeric::Quaternion< T > numeric::BodyPosition< typename >::Quaternion |
| typedef T& numeric::BodyPosition< typename >::Reference |
| typedef T& numeric::BodyPosition< typename >::reference |
| typedef xyzMatrix< T > numeric::BodyPosition< typename >::Rotation |
| typedef NumericTraits< T > numeric::BodyPosition< typename >::Traits |
| typedef xyzVector< T > numeric::BodyPosition< typename >::Translation |
| typedef T numeric::BodyPosition< typename >::Value |
| typedef T numeric::BodyPosition< typename >::value_type |
| typedef xyzVector< T > numeric::BodyPosition< typename >::Vector |
|
inline |
Default constructor.
Referenced by numeric::BodyPosition< typename >::identity(), and numeric::BodyPosition< typename >::inverse().
|
inline |
Rotation + Translation constructor.
|
inline |
Rotation constructor.
|
inline |
Quaternion + Translation constructor.
|
inline |
Quaternion constructor.
|
inline |
Point + Vector constructor.
References numeric::csc(), numeric::xyzVector< typename >::is_normalized(), and basic::T().
|
inline |
Copy constructor.
|
inline |
Destructor.
|
inline |
Principal angle of rotation (on [0,2*pi])
References numeric::Quaternion< typename >::angle(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, and numeric::BodyPosition< typename >::q_refresh().
|
inline |
Apply a successive BodyPosition transformation.
References numeric::BodyPosition< typename >::left_transform_by().
|
inline |
Axis of Rotation unit vector (direction for angle on [0,2*pi])
References numeric::Quaternion< typename >::axis(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, and numeric::BodyPosition< typename >::q_refresh().
|
inline |
Axis of rotation unit vector: Passed vector (direction for angle on [0,2*pi])
References numeric::Quaternion< typename >::axis(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, and numeric::BodyPosition< typename >::q_refresh().
|
inlinestatic |
Identity BodyPosition for expressions.
|
inlinestatic |
Identity named constructor.
References numeric::BodyPosition< typename >::BodyPosition().
|
inline |
Inverse.
References numeric::BodyPosition< typename >::BodyPosition().
|
inline |
Inverse transform a Point.
References numeric::inplace_transpose_product(), numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), and numeric::BodyPosition< typename >::t_.
|
inline |
Inverse transformed Point.
References numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), numeric::BodyPosition< typename >::t_, and numeric::transpose_product().
|
inline |
|
inline |
Invert.
References numeric::inplace_product(), numeric::Quaternion< typename >::invert(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), basic::T(), numeric::BodyPosition< typename >::t_, and numeric::xyzMatrix< typename >::transpose().
|
inline |
Left transform by a BodyPosition.
References numeric::Quaternion< typename >::left_multiply_by(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_fresh_, and numeric::BodyPosition< typename >::t_.
Referenced by numeric::BodyPosition< typename >::apply().
|
inline |
Left transform by the inverse of a BodyPosition.
References numeric::Quaternion< typename >::left_multiply_by_inverse_of(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_fresh_, and numeric::BodyPosition< typename >::t_.
|
inline |
|
inline |
Normalize if magnitude squared error exceeds tolerance.
References numeric::Quaternion< typename >::normalize_if_needed(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::q_refresh(), and numeric::BodyPosition< typename >::R_fresh_.
|
inline |
|
inline |
|
inline |
|
inlineprivate |
Refresh Quaternion from rotation matrix.
References numeric::Quaternion< typename >::normalize(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), basic::T(), numeric::Quaternion< typename >::w_, numeric::Quaternion< typename >::x_, numeric::xyzMatrix< typename >::xx(), numeric::xyzMatrix< typename >::xy(), numeric::xyzMatrix< typename >::xz(), numeric::Quaternion< typename >::y_, numeric::xyzMatrix< typename >::yx(), numeric::xyzMatrix< typename >::yy(), numeric::xyzMatrix< typename >::yz(), numeric::Quaternion< typename >::z_, numeric::xyzMatrix< typename >::zx(), numeric::xyzMatrix< typename >::zy(), and numeric::xyzMatrix< typename >::zz().
Referenced by numeric::BodyPosition< typename >::angle(), numeric::BodyPosition< typename >::axis(), numeric::BodyPosition< typename >::left_transform_by(), numeric::BodyPosition< typename >::left_transform_by_inverse_of(), numeric::BodyPosition< typename >::normalize(), numeric::BodyPosition< typename >::normalize_if_needed(), numeric::BodyPosition< typename >::q(), numeric::BodyPosition< typename >::right_transform_by(), and numeric::BodyPosition< typename >::right_transform_by_inverse_of().
|
inline |
|
inlineprivate |
Refresh rotation matrix from Quaternion.
References numeric::Quaternion< typename >::normalize(), numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, basic::T(), numeric::Quaternion< typename >::w_, numeric::Quaternion< typename >::x_, numeric::xyzMatrix< typename >::xx(), numeric::xyzMatrix< typename >::xy(), numeric::xyzMatrix< typename >::xz(), numeric::Quaternion< typename >::y_, numeric::xyzMatrix< typename >::yx(), numeric::xyzMatrix< typename >::yy(), numeric::xyzMatrix< typename >::yz(), numeric::Quaternion< typename >::z_, numeric::xyzMatrix< typename >::zx(), numeric::xyzMatrix< typename >::zy(), and numeric::xyzMatrix< typename >::zz().
Referenced by numeric::BodyPosition< typename >::inverse_transform(), numeric::BodyPosition< typename >::inverse_transformed(), numeric::BodyPosition< typename >::inverse_translation(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::operator()(), numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R(), numeric::BodyPosition< typename >::transform(), and numeric::BodyPosition< typename >::transformed().
|
inline |
Right transform by a BodyPosition.
References numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_fresh_, numeric::Quaternion< typename >::right_multiply_by(), numeric::BodyPosition< typename >::t_, and numeric::BodyPosition< typename >::transformed().
|
inline |
Right transform by the inverse of a BodyPosition.
References numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_fresh_, numeric::Quaternion< typename >::right_multiply_by_inverse_of(), numeric::BodyPosition< typename >::t_, and numeric::BodyPosition< typename >::transform().
|
inline |
Translation.
References numeric::BodyPosition< typename >::t_.
|
inline |
Identity.
References numeric::BodyPosition< typename >::q_, numeric::BodyPosition< typename >::q_fresh_, numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, basic::T(), numeric::BodyPosition< typename >::t_, numeric::Quaternion< typename >::to_identity(), and numeric::xyzMatrix< typename >::to_identity().
|
inline |
Transform a Point.
References numeric::inplace_product(), numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), and numeric::BodyPosition< typename >::t_.
Referenced by numeric::BodyPosition< typename >::right_transform_by_inverse_of().
|
inline |
Transformed Point.
References numeric::product(), numeric::BodyPosition< typename >::R_, numeric::BodyPosition< typename >::R_fresh_, numeric::BodyPosition< typename >::R_refresh(), and numeric::BodyPosition< typename >::t_.
Referenced by numeric::BodyPosition< typename >::right_transform_by().
|
friend |
|
friend |
|
mutableprivate |
Referenced by numeric::BodyPosition< typename >::angle(), numeric::BodyPosition< typename >::axis(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::left_transform_by(), numeric::BodyPosition< typename >::left_transform_by_inverse_of(), numeric::BodyPosition< typename >::normalize(), numeric::BodyPosition< typename >::normalize_if_needed(), numeric::BodyPosition< typename >::operator=(), numeric::BodyPosition< typename >::q(), numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_refresh(), numeric::BodyPosition< typename >::right_transform_by(), numeric::BodyPosition< typename >::right_transform_by_inverse_of(), and numeric::BodyPosition< typename >::to_identity().
|
mutableprivate |
Quaternion status.
Referenced by numeric::BodyPosition< typename >::angle(), numeric::BodyPosition< typename >::axis(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::left_transform_by(), numeric::BodyPosition< typename >::left_transform_by_inverse_of(), numeric::BodyPosition< typename >::normalize(), numeric::BodyPosition< typename >::normalize_if_needed(), numeric::BodyPosition< typename >::operator=(), numeric::BodyPosition< typename >::q(), numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R_refresh(), numeric::BodyPosition< typename >::right_transform_by(), numeric::BodyPosition< typename >::right_transform_by_inverse_of(), and numeric::BodyPosition< typename >::to_identity().
|
mutableprivate |
Rotation matrix.
Referenced by numeric::BodyPosition< typename >::inverse_transform(), numeric::BodyPosition< typename >::inverse_transformed(), numeric::BodyPosition< typename >::inverse_translation(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::operator()(), numeric::BodyPosition< typename >::operator=(), numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R(), numeric::BodyPosition< typename >::R_refresh(), numeric::BodyPosition< typename >::to_identity(), numeric::BodyPosition< typename >::transform(), and numeric::BodyPosition< typename >::transformed().
|
mutableprivate |
Rotation matrix status.
Referenced by numeric::BodyPosition< typename >::inverse_transform(), numeric::BodyPosition< typename >::inverse_transformed(), numeric::BodyPosition< typename >::inverse_translation(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::left_transform_by(), numeric::BodyPosition< typename >::left_transform_by_inverse_of(), numeric::BodyPosition< typename >::normalize(), numeric::BodyPosition< typename >::normalize_if_needed(), numeric::BodyPosition< typename >::operator()(), numeric::BodyPosition< typename >::operator=(), numeric::BodyPosition< typename >::q_refresh(), numeric::BodyPosition< typename >::R(), numeric::BodyPosition< typename >::R_refresh(), numeric::BodyPosition< typename >::right_transform_by(), numeric::BodyPosition< typename >::right_transform_by_inverse_of(), numeric::BodyPosition< typename >::to_identity(), numeric::BodyPosition< typename >::transform(), and numeric::BodyPosition< typename >::transformed().
|
private |
Translation.
Referenced by numeric::BodyPosition< typename >::inverse_transform(), numeric::BodyPosition< typename >::inverse_transformed(), numeric::BodyPosition< typename >::inverse_translation(), numeric::BodyPosition< typename >::invert(), numeric::BodyPosition< typename >::left_transform_by(), numeric::BodyPosition< typename >::left_transform_by_inverse_of(), numeric::BodyPosition< typename >::operator()(), numeric::BodyPosition< typename >::operator=(), numeric::BodyPosition< typename >::right_transform_by(), numeric::BodyPosition< typename >::right_transform_by_inverse_of(), numeric::BodyPosition< typename >::t(), numeric::BodyPosition< typename >::to_identity(), numeric::BodyPosition< typename >::transform(), and numeric::BodyPosition< typename >::transformed().
1.8.7