8 #ifndef IMPALGEBRA_TRANSFORMATION_2D_H 
    9 #define IMPALGEBRA_TRANSFORMATION_2D_H 
   11 #include <IMP/algebra/algebra_config.h> 
   16 #include <cereal/access.hpp> 
   18 IMPALGEBRA_BEGIN_NAMESPACE
 
   20 #if !defined(IMP_DOXYGEN) && !defined(SWIG) 
   22 class Transformation2D;
 
   23 Transformation2D 
compose(
const Transformation2D &a, 
const Transformation2D &b);
 
   38       : trans_(t), rot_(r) {}
 
   53     return rot_.get_rotated(o) + trans_;
 
   95   void set_rotation(
double angle) { rot_.
set_angle(angle); }
 
  108     out << 
" || " << trans_;
 
  112   Transformation2D get_inverse() 
const;
 
  118   friend class cereal::access;
 
  120   template<
class Archive> 
void serialize(Archive &ar) {
 
  158 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. 
 
A more IMP-like version of the std::vector. 
 
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.