RDCode: RDGeom::Transform2D Class Reference

# RDGeom::Transform2D Class Reference

`#include <Transform2D.h>`

Inheritance diagram for RDGeom::Transform2D:

List of all members.

## Public Member Functions
| Transform2D ()
| Constructor.
void | setToIdentity ()
void | TransformPoint (Point2D &pt) const
void | SetTranslation (const Point2D &pt)
void | SetTransform (const Point2D &ref1, const Point2D &ref2, const Point2D &pt1, const Point2D &pt2)
| Set the tranform so that the specified points are aligned.
void | SetTransform (const Point2D &pt, double angle)
| Set the trans form to counterclock wise rotation by the specified value around point.

## Detailed Description

Definition at line 16 of file Transform2D.h.

## Constructor & Destructor Documentation

RDGeom::Transform2D::Transform2D | ( |  | ) | `[inline]`

Constructor.

Initialize to an identity matrix transformation This is a 3x3 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 31 of file Transform2D.h.

References RDNumeric::Matrix< double >::d_data, and RDGeom::DIM_2D.

## Member Function Documentation

void RDGeom::Transform2D::setToIdentity | ( |  | ) |

void RDGeom::Transform2D::TransformPoint | ( | Point2D & | pt | ) | const

Referenced by RDDepict::EmbeddedAtom::Transform().

void RDGeom::Transform2D::SetTranslation | ( | const Point2D & | pt | ) |

void RDGeom::Transform2D::SetTransform | ( | const Point2D & | ref1,
|  | const Point2D & | ref2,
|  | const Point2D & | pt1,
|  | const Point2D & | pt2 |
| ) |  |  |

Set the tranform so that the specified points are aligned.

The resulting tranformation will align pt1 with ref1, and rotation pt2 such that the line betweem (pt1, pt2) will align with with the line (ref1, ref2)

void RDGeom::Transform2D::SetTransform | ( | const Point2D & | pt,
|  | double | angle |
| ) |  |  |

Set the trans form to counterclock wise rotation by the specified value around point.

ARGUMENTS:

- pt : point about which to rotate
- angle : the angle byt which to rotate

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

- Transform2D.h