geirs2Panic  Richard J. Mathar
Fits header keyword batch editor
 All Classes Files Functions Variables Macros Pages
RotTrans2D.h
Go to the documentation of this file.
1 #ifndef ROTTRANS2D_H
2 #define ROTTRANS2D_H
3 /*
4 * "$Header:$"
5 *
6 */
7 
8 /*
9 #include <string>
10 #include <vector>
11 */
12 
13 #include "Point2D.h"
14 
15 using namespace std ;
16 
17 /*!*
18 * @brief A rotation followed by a translation.
19 *
20 * The class represents an active ccw rotation around (0,0) specified by an angle
21 * followed by a translation specified by its 2 delta coordinates.
22 *
23 * A rotation around another fixed point followed by a translation
24 * is also represented by this class, but mapped on a rotation around (0,0).
25 *
26 * Note that the two components of the transformation, the rotation
27 * and translation, are not commutative operations in general.
28 *
29 * Note also that the translation vector is to be interpreted in
30 * the original coordinate system (as indicated by *active*).
31 * @since 2013-07-04
32 * @author Richard J. Mathar
33 */
34 class RotTrans2D {
35 
36 public:
40  double angle ;
41 
45 
50  double sc[2] ;
51 
52  RotTrans2D(double ang, double tx , double ty) ;
53  RotTrans2D(double ang, const Point2D & t) ;
54  RotTrans2D(double ang, const Point2D & fixpt, const Point2D & t) ;
55  RotTrans2D() ;
56  // ~RotTrans2D() ;
57 
58  RotTrans2D inv() const ;
59 
60  Point2D apply(const Point2D &pt) const ;
61 
62 protected:
63 
64 private:
65 
66 } ; /* RotTrans2D */
67 
68 #if 0
69 RotTrans2D & operator*(const RotTrans2D &left, const RotTrans2D &right) ;
70 #endif
71 
72 #endif /* ROTTRANS2D_H */
73 
A rotation followed by a translation.
Definition: RotTrans2D.h:34
double angle
The angle of rotation (radians).
Definition: RotTrans2D.h:40
Point2D trans
The translation vector.
Definition: RotTrans2D.h:44
A point with 2 coordinates represented in a Cartesian coordinate system.
Definition: Point2D.h:20