RobWorkProject  24.5.15-
Public Types | Public Member Functions | Friends | List of all members
Transform3DVector< T > Class Template Reference

this class is a interpolatable Transform3D, consisting of a Vecor3D and a Quaternion. It is implemented to be very Interconvertable with a Transform3D, and allow operations souch as Transform * scalar and Transform + Transform. More...

#include <Transform3DVector.hpp>

Public Types

typedef Eigen::Matrix< T, 7, 1 > type
 
typedef rw::core::Ptr< Transform3DVector< T > > Ptr
 
typedef T value_type
 

Public Member Functions

 Transform3DVector ()
 default constructor
 
 Transform3DVector (const rw::math::Vector3D< T > &vec, const rw::math::Quaternion< T > &rot)
 Constuct a Transformation matrix as a Vector. More...
 
 Transform3DVector (const rw::math::Vector3D< T > &vec, const rw::math::Rotation3DVector< T > &rot)
 Constuct a Transformation matrix as a Vector. More...
 
 Transform3DVector (const rw::math::Transform3D< T > &t3d)
 Constuct a Transform3DVector from a Transform3D. More...
 
 Transform3DVector (const type &vec)
 Constuct a Transform3DVector from a EigenVector. More...
 
 ~Transform3DVector ()
 destructor
 
Transform3DVector< T > operator+ (const rw::math::Vector3D< T > &rhs) const
 add a Vector3D to the position of the transform More...
 
Transform3DVector< T > operator- (const rw::math::Vector3D< T > &rhs) const
 subtract a Vector3D from the position of the transform More...
 
rw::math::Vector3D< T > operator* (const rw::math::Vector3D< T > &rhs) const
 Matrix vector multiplication with Vector3D. Same as Transform3D<> * Vector3D<>;. More...
 
Transform3DVector< T > operator+ (const rw::math::Quaternion< T > &rhs) const
 add a Quaternion to the rotation of the transform More...
 
Transform3DVector< T > operator- (const rw::math::Quaternion< T > &rhs) const
 subtract a Quaternion from the rotation of the transform More...
 
Transform3DVector< T > operator/ (const rw::math::Quaternion< T > &rhs) const
 element wise devide a Quaternion with the Quaternion rotation of the transform More...
 
Transform3DVector< T > operator* (const rw::math::Quaternion< T > &rhs) const
 element wise multiply a Quaternion with the Quaternion rotation of the transform More...
 
Transform3DVector< T > operator+ (const Transform3DVector< T > &rhs) const
 element wise add two Transform3DVectors More...
 
Transform3DVector< T > operator- (const Transform3DVector< T > &rhs) const
 element wise subtract two Transform3DVectors More...
 
Transform3DVector< T > operator* (const T &rhs) const
 Scalar multiplication. More...
 
Transform3DVector< T > operator+ (const T &rhs) const
 Scalar addition. More...
 
Transform3DVector< T > operator- (const T &rhs) const
 Scalar subtraction. More...
 
Transform3DVector< T > operator/ (const T &rhs) const
 Scalar devision. More...
 
T & operator() (size_t i)
 acces operator More...
 
operator() (size_t i) const
 acces operator More...
 
T & operator[] (size_t i)
 acces operator More...
 
operator[] (size_t i) const
 acces operator More...
 
size_t size () const
 get the size. Index 0-2 Vector, 3-6 Quaternion More...
 
rw::math::Vector3D< T > toVector3D () const
 get the position Vector of the transform More...
 
rw::math::Quaternion< T > toQuaternion () const
 get the Rotation of the transform More...
 
rw::math::EAA< T > toEAA () const
 convert the rotation part to EAA More...
 
rw::math::Transform3D< T > toTransform3D () const
 Returns the corresponding Trandforma3D matrix. More...
 
Eigen::Matrix< T, 7, 1 > & e ()
 get the underling eigen type More...
 
Transform3DVector< T > & operator= (const Transform3DVector< T > &rhs)
 copy the transform More...
 
Transform3DVector< T > & operator+= (const Transform3DVector< T > &rhs)
 add to the transform More...
 
Transform3DVector< T > & operator-= (const Transform3DVector< T > &rhs)
 subtract from the transform More...
 
Transform3DVector< T > & operator= (const rw::math::Quaternion< T > &rhs)
 Override the Roation of the transform. More...
 
Transform3DVector< T > & operator+= (const rw::math::Quaternion< T > &rhs)
 add to the Roation of the transform More...
 
Transform3DVector< T > & operator-= (const rw::math::Quaternion< T > &rhs)
 add to the Roation of the transform More...
 
Transform3DVector< T > & operator= (const rw::math::Transform3D< T > &rhs)
 convert and copy the transform More...
 
Transform3DVector< T > & operator= (const rw::math::Vector3D< T > &rhs)
 Override the position of the transform. More...
 
Transform3DVector< T > & operator+= (const rw::math::Vector3D< T > &rhs)
 add to the position of the transform More...
 
Transform3DVector< T > & operator-= (const rw::math::Vector3D< T > &rhs)
 subtract from the position of the transform More...
 
Transform3DVector< T > & operator= (const type &rhs)
 copy the transform from an eigen vector More...
 
 operator Transform3D< T > () const
 implicit conversion to transform
 

Friends

Transform3DVector< T > operator* (const T &lhs, const Transform3DVector< T > &rhs)
 Scalar multiplication. More...
 
Transform3DVector< T > operator+ (const T &lhs, const Transform3DVector< T > &rhs)
 Scalar addition. More...
 
Transform3DVector< T > operator- (const T &lhs, const Transform3DVector< T > &rhs)
 Scalar subtraction. More...
 
Transform3DVector< T > operator/ (const T &lhs, const Transform3DVector< T > &rhs)
 Scalar devision. More...
 
std::ostream & operator<< (std::ostream &os, const Transform3DVector< T > &t)
 

Detailed Description

template<class T = double>
class rw::math::Transform3DVector< T >

this class is a interpolatable Transform3D, consisting of a Vecor3D and a Quaternion. It is implemented to be very Interconvertable with a Transform3D, and allow operations souch as Transform * scalar and Transform + Transform.

Constructor & Destructor Documentation

◆ Transform3DVector() [1/4]

Transform3DVector ( const rw::math::Vector3D< T > &  vec,
const rw::math::Quaternion< T > &  rot 
)
inline

Constuct a Transformation matrix as a Vector.

Parameters
vec[in] the vector of the transform
rot[in] the rotation of the transform

◆ Transform3DVector() [2/4]

Transform3DVector ( const rw::math::Vector3D< T > &  vec,
const rw::math::Rotation3DVector< T > &  rot 
)
inline

Constuct a Transformation matrix as a Vector.

Parameters
vec[in] the vector of the transform
rot[in] the rotation of the transform

◆ Transform3DVector() [3/4]

Transform3DVector ( const rw::math::Transform3D< T > &  t3d)
inline

Constuct a Transform3DVector from a Transform3D.

Parameters
t3d[in] Transform3D

◆ Transform3DVector() [4/4]

Transform3DVector ( const type &  vec)
inline

Constuct a Transform3DVector from a EigenVector.

Parameters
vec[in] Transform3D

Member Function Documentation

◆ e()

Eigen::Matrix<T, 7, 1>& e ( )
inline

get the underling eigen type

Returns
reference to eigen vector

◆ operator()() [1/2]

T& operator() ( size_t  i)
inline

acces operator

Parameters
i[in] index of the Vector
Returns
requested value

◆ operator()() [2/2]

T operator() ( size_t  i) const
inline

acces operator

Parameters
i[in] index of the Vector
Returns
requested value

◆ operator*() [1/3]

Transform3DVector<T> operator* ( const rw::math::Quaternion< T > &  rhs) const
inline

element wise multiply a Quaternion with the Quaternion rotation of the transform

Parameters
rhs[in] the right hand side value
Returns
result of multiplication

◆ operator*() [2/3]

rw::math::Vector3D<T> operator* ( const rw::math::Vector3D< T > &  rhs) const
inline

Matrix vector multiplication with Vector3D. Same as Transform3D<> * Vector3D<>;.

Parameters
rhs[in] the right hand side value
Returns
result of multiplication

◆ operator*() [3/3]

Transform3DVector<T> operator* ( const T &  rhs) const
inline

Scalar multiplication.

Parameters
rhs[in] the scalar to multiply with
Returns
product of the multiplication

◆ operator+() [1/4]

Transform3DVector<T> operator+ ( const rw::math::Quaternion< T > &  rhs) const
inline

add a Quaternion to the rotation of the transform

Parameters
rhs[in] the right hand side value
Returns
result of devision

◆ operator+() [2/4]

Transform3DVector<T> operator+ ( const rw::math::Vector3D< T > &  rhs) const
inline

add a Vector3D to the position of the transform

Parameters
rhs[in] the right hand side value
Returns
result of devision

◆ operator+() [3/4]

Transform3DVector<T> operator+ ( const T &  rhs) const
inline

Scalar addition.

Parameters
rhs[in] the scalar to add
Returns
the sum

◆ operator+() [4/4]

Transform3DVector<T> operator+ ( const Transform3DVector< T > &  rhs) const
inline

element wise add two Transform3DVectors

Parameters
rhs[in] the Transform3D vector to be added with
Returns
the sum of the two objects

◆ operator+=() [1/3]

Transform3DVector<T>& operator+= ( const rw::math::Quaternion< T > &  rhs)
inline

add to the Roation of the transform

Parameters
rhsthe rotation to be added
Returns
a copy of this object

◆ operator+=() [2/3]

Transform3DVector<T>& operator+= ( const rw::math::Vector3D< T > &  rhs)
inline

add to the position of the transform

Parameters
rhsthe new position
Returns
a copy of this object

◆ operator+=() [3/3]

Transform3DVector<T>& operator+= ( const Transform3DVector< T > &  rhs)
inline

add to the transform

Parameters
rhsthe transform to be added
Returns
a copy of this object

◆ operator-() [1/4]

Transform3DVector<T> operator- ( const rw::math::Quaternion< T > &  rhs) const
inline

subtract a Quaternion from the rotation of the transform

Parameters
rhs[in] the right hand side value
Returns
result of devision

◆ operator-() [2/4]

Transform3DVector<T> operator- ( const rw::math::Vector3D< T > &  rhs) const
inline

subtract a Vector3D from the position of the transform

Parameters
rhs[in] the right hand side value
Returns
result of devision

◆ operator-() [3/4]

Transform3DVector<T> operator- ( const T &  rhs) const
inline

Scalar subtraction.

Parameters
rhs[in] the scalar to subtract
Returns
the difference

◆ operator-() [4/4]

Transform3DVector<T> operator- ( const Transform3DVector< T > &  rhs) const
inline

element wise subtract two Transform3DVectors

Parameters
rhs[in] the Transform3D vector to be subtracted with
Returns
the difference of the two objects

◆ operator-=() [1/3]

Transform3DVector<T>& operator-= ( const rw::math::Quaternion< T > &  rhs)
inline

add to the Roation of the transform

Parameters
rhsthe rotation to be added
Returns
a copy of this object

◆ operator-=() [2/3]

Transform3DVector<T>& operator-= ( const rw::math::Vector3D< T > &  rhs)
inline

subtract from the position of the transform

Parameters
rhsthe new position
Returns
a copy of this object

◆ operator-=() [3/3]

Transform3DVector<T>& operator-= ( const Transform3DVector< T > &  rhs)
inline

subtract from the transform

Parameters
rhsthe transform to be subtracted
Returns
a copy of this object

◆ operator/() [1/2]

Transform3DVector<T> operator/ ( const rw::math::Quaternion< T > &  rhs) const
inline

element wise devide a Quaternion with the Quaternion rotation of the transform

Parameters
rhs[in] the right hand side value
Returns
result of devision

◆ operator/() [2/2]

Transform3DVector<T> operator/ ( const T &  rhs) const
inline

Scalar devision.

Parameters
rhs[in] the scalar to devide with
Returns
the result

◆ operator=() [1/5]

Transform3DVector<T>& operator= ( const rw::math::Quaternion< T > &  rhs)
inline

Override the Roation of the transform.

Parameters
rhsthe new rotation
Returns
a copy of this object

◆ operator=() [2/5]

Transform3DVector<T>& operator= ( const rw::math::Transform3D< T > &  rhs)
inline

convert and copy the transform

Parameters
rhsthe transform to copy
Returns
a copy of this object

◆ operator=() [3/5]

Transform3DVector<T>& operator= ( const rw::math::Vector3D< T > &  rhs)
inline

Override the position of the transform.

Parameters
rhsthe new position
Returns
a copy of this object

◆ operator=() [4/5]

Transform3DVector<T>& operator= ( const Transform3DVector< T > &  rhs)
inline

copy the transform

Parameters
rhsthe transform to copy
Returns
a copy of this object

◆ operator=() [5/5]

Transform3DVector<T>& operator= ( const type &  rhs)
inline

copy the transform from an eigen vector

Parameters
rhsthe transform to copy
Returns
a copy of this object

◆ operator[]() [1/2]

T& operator[] ( size_t  i)
inline

acces operator

Parameters
i[in] index of the Vector
Returns
requested value

◆ operator[]() [2/2]

T operator[] ( size_t  i) const
inline

acces operator

Parameters
i[in] index of the Vector
Returns
requested value

◆ size()

size_t size ( ) const
inline

get the size. Index 0-2 Vector, 3-6 Quaternion

Returns
always 7

◆ toEAA()

rw::math::EAA<T> toEAA ( ) const
inline

convert the rotation part to EAA

Returns
toration in EAA form

◆ toQuaternion()

rw::math::Quaternion<T> toQuaternion ( ) const
inline

get the Rotation of the transform

Returns
a copy of the quaternion rotation

◆ toTransform3D()

rw::math::Transform3D<T> toTransform3D ( ) const
inline

Returns the corresponding Trandforma3D matrix.

Returns
The transformation matrix

◆ toVector3D()

rw::math::Vector3D<T> toVector3D ( ) const
inline

get the position Vector of the transform

Returns
a copy of the position vector

Friends And Related Function Documentation

◆ operator*

Transform3DVector<T> operator* ( const T &  lhs,
const Transform3DVector< T > &  rhs 
)
friend

Scalar multiplication.

Parameters
lhs[in] the scalar to multiply with
rhs[in] the Transform3DVector being multiplied with a scalar
Returns
product of the multiplication

◆ operator+

Transform3DVector<T> operator+ ( const T &  lhs,
const Transform3DVector< T > &  rhs 
)
friend

Scalar addition.

Parameters
lhs[in] the scalar to subtraction
rhs[in] the Transform3DVector being subtracted from
Returns
the difference

◆ operator-

Transform3DVector<T> operator- ( const T &  lhs,
const Transform3DVector< T > &  rhs 
)
friend

Scalar subtraction.

Parameters
lhs[in] the scalar to subtract
rhs[in] the Transform3DVector being subtracted from
Returns
the difference

◆ operator/

Transform3DVector<T> operator/ ( const T &  lhs,
const Transform3DVector< T > &  rhs 
)
friend

Scalar devision.

Parameters
lhs[in] the scalar to devide with
rhs[in] the Transform3DVector being devided
Returns
the result

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