RDGeom::Transform3D Class Reference

`#include <Transform3D.h>`

Inheritance diagram for RDGeom::Transform3D:

## Public Member Functions

| Transform3D ()
| Constructor. More...
void | setToIdentity ()
void | TransformPoint (Point3D &pt) const
void | SetTranslation (const Point3D &move)
| Set the translation vector. More...
void | SetRotation (double angle, AxisType axis)
| set the rotation matrix More...
void | SetRotation (double angle, const Point3D &axis)
| set the rotation matrix More...
void | SetRotation (double cosT, double sinT, const Point3D &axis)
void | SetRotationFromQuaternion (double quaternion[4])
| Set the rotation matrix from a quaternion. More...
void | Reflect ()
| Reflect the rotation. More...
Public Member Functions inherited from RDNumeric::SquareMatrix< double >
| SquareMatrix ()
| brief Square matrix of size N More...
| SquareMatrix (unsigned int N)
| SquareMatrix (unsigned int N, double val)
| SquareMatrix (unsigned int N, typename Matrix< double >::DATA_SPTR data)
SquareMatrix< double > & | operator*= (double scale) override
| Multiplication by a scalar. More...
virtual SquareMatrix< double > & | operator*= (const SquareMatrix< double > &B)
| In place matrix multiplication. More...
virtual SquareMatrix< double > & | transposeInplace ()
| In place matrix transpose. More...
Public Member Functions inherited from RDNumeric::Matrix< TYPE >
| Matrix (unsigned int nRows, unsigned int nCols)
| Initialize with a size. More...
| Matrix (unsigned int nRows, unsigned int nCols, TYPE val)
| Initialize with a size and default value. More...
| Matrix (unsigned int nRows, unsigned int nCols, DATA_SPTR data)
| Initialize from a pointer. More...
| Matrix (const Matrix< TYPE > &other)
| copy constructor More...
virtual | ~Matrix ()
unsigned int | numRows () const
| returns the number of rows More...
unsigned int | numCols () const
| returns the number of columns More...
unsigned int | getDataSize () const
virtual TYPE | getVal (unsigned int i, unsigned int j) const
| returns a particular element of the matrix More...
virtual void | setVal (unsigned int i, unsigned int j, TYPE val)
| sets a particular element of the matrix More...
virtual void | getRow (unsigned int i, Vector< TYPE > &row) const
| returns a copy of a row of the matrix More...
virtual void | getCol (unsigned int i, Vector< TYPE > &col) const
| returns a copy of a column of the matrix More...
TYPE * | getData ()
| returns a pointer to our data array More...
const TYPE * | getData () const
| returns a const pointer to our data array More...
Matrix< TYPE > & | assign (const Matrix< TYPE > &other)
| Copy operator. More...
virtual Matrix< TYPE > & | operator+= (const Matrix< TYPE > &other)
| Matrix addition. More...
virtual Matrix< TYPE > & | operator-= (const Matrix< TYPE > &other)
| Matrix subtraction. More...
virtual Matrix< TYPE > & | operator*= (TYPE scale)
| Multiplication by a scalar. More...
virtual Matrix< TYPE > & | operator/= (TYPE scale)
| division by a scalar More...
virtual Matrix< TYPE > & | transpose (Matrix< TYPE > &transpose) const
| copies the transpose of this Matrix into another, returns the result More...

## Additional Inherited Members

Public Types inherited from RDNumeric::Matrix< TYPE >
typedef boost::shared_array< TYPE > | DATA_SPTR
Protected Member Functions inherited from RDNumeric::Matrix< TYPE >
| Matrix ()
Protected Attributes inherited from RDNumeric::Matrix< TYPE >
unsigned int | d_nRows {0}
unsigned int | d_nCols {0}
unsigned int | d_dataSize {0}
DATA_SPTR | d_data

## Detailed Description

Definition at line 22 of file Transform3D.h.

## Constructor & Destructor Documentation

## Transform3D()

RDGeom::Transform3D::Transform3D | ( |  | ) |

inline

Constructor.

Initialize to an identity matrix transformation. This is a 4x4 matrix that includes the rotation and translation parts see Foley's "Introduction to Computer Graphics" for the representation

Operator *= and = are provided by the parent class square matrix. Operator *= needs some explanation, since the order matters. This transform gets set to the combination other and the current state of this transform If this_old and this_new are the states of this object before and after this function we have this_new(point) = this_old(other(point))

Definition at line 41 of file Transform3D.h.

References RDGeom::DIM_3D.

## Member Function Documentation

## Reflect()

void RDGeom::Transform3D::Reflect | ( |  | ) |

Reflect the rotation.

## SetRotation() [1/3]

void RDGeom::Transform3D::SetRotation | ( | double | angle,
|  | AxisType | axis
| ) |  |

set the rotation matrix

The rotation matrix is set to rotation by th specified angle about the specified axis

Referenced by RDGeom::compute14Dist3D().

## SetRotation() [2/3]

void RDGeom::Transform3D::SetRotation | ( | double | angle,
|  | const Point3D & | axis
| ) |  |

set the rotation matrix

The rotation matrix is set to rotation by th specified angle about an arbitrary axis

## SetRotation() [3/3]

void RDGeom::Transform3D::SetRotation | ( | double | cosT,
|  | double | sinT,
|  | const Point3D & | axis
| ) |  |

## SetRotationFromQuaternion()

void RDGeom::Transform3D::SetRotationFromQuaternion | ( | double | quaternion[4] | ) |

Set the rotation matrix from a quaternion.

## setToIdentity()

void RDGeom::Transform3D::setToIdentity | ( |  | ) |

## SetTranslation()

void RDGeom::Transform3D::SetTranslation | ( | const Point3D & | move | ) |

Set the translation vector.

## TransformPoint()

void RDGeom::Transform3D::TransformPoint | ( | Point3D & | pt | ) | const

Referenced by RDGeom::compute14Dist3D().

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

- Transform3D.h