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_;
94 void set_rotation(
double angle) { rot_.
set_angle(angle); }
107 out <<
" || " << trans_;
111 Transformation2D get_inverse()
const;
150 IMPALGEBRA_END_NAMESPACE
Base class for geometric types.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Represent a rotation in 2D space.
Represent a rotation in 2D space.
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)
Generate 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()
Build an identity rotation in 2D.
Vector2D get_rotated(const Vector2D &o) const
Rotate a 2D point.
Transformation2D compose(const Transformation2D &a, const Transformation2D &b)
Compose two transformations.
void set_angle(double angle)
Set the angle for the rotation.
Transformation2D get_identity_transformation_2d()
Return a transformation that does not do anything.