8 #ifndef IMPALGEBRA_TRANSFORMATION_2D_H
9 #define IMPALGEBRA_TRANSFORMATION_2D_H
11 #include <IMP/algebra/algebra_config.h>
17 IMPALGEBRA_BEGIN_NAMESPACE
19 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
21 class Transformation2D;
22 Transformation2D
compose(
const Transformation2D &a,
const Transformation2D &b);
37 : trans_(t), rot_(r) {}
52 return rot_.get_rotated(o) + trans_;
93 void set_rotation(
double angle) { rot_.
set_angle(angle); }
106 out <<
" || " << trans_;
110 Transformation2D get_inverse()
const;
149 IMPALGEBRA_END_NAMESPACE
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Classes and operations related with rotations.
Stores a 2D rotation matrix.
Rotation2D compose(const Rotation2D &a, const Rotation2D &b)
compose two rotations a and b
Transformation2D get_rotation_about_point(const Vector2D &point, const Rotation2D &rotation)
Generates a Transformation2D object from a rotation around a point.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Base class for geometric types.
Rotation2D get_identity_rotation_2d()
Builds an identity rotation in 2D.
Vector2D get_rotated(const Vector2D &o) const
rotates a 2D point
Transformation2D compose(const Transformation2D &a, const Transformation2D &b)
Compose two transformations.
void set_angle(double angle)
sets the angle for the rotation
Transformation2D get_identity_transformation_2d()
Returns a transformation that does not do anything.