9 #ifndef IMPALGEBRA_TRANSFORMATION_3D_H
10 #define IMPALGEBRA_TRANSFORMATION_3D_H
12 #include <IMP/algebra/algebra_config.h>
18 IMPALGEBRA_BEGIN_NAMESPACE
20 #if !defined(IMP_DOXYGEN) && !defined(SWIG)
21 class Transformation3D;
22 Transformation3D
compose(
const Transformation3D &a,
const Transformation3D &b);
37 : trans_(t), rot_(r) {}
44 return rot_.get_rotated(o) + trans_;
71 const Rotation3D &get_rotation()
const {
return rot_; }
72 const Vector3D &get_translation()
const {
return trans_; }
76 out <<
" || " << trans_;
78 Transformation3D get_inverse()
const;
115 class Transformation2D;
122 IMPALGEBRAEXPORT Transformation3D
133 IMPALGEBRAEXPORT Transformation3D
135 double max_translation = 5.,
136 double max_angle_in_rad = 0.26);
142 for (
unsigned int i = 0; i < 2; ++i) {
143 for (
unsigned int j = 0; j < 2; ++j) {
144 for (
unsigned int k = 0; k < 2; ++k) {
154 IMPALGEBRA_END_NAMESPACE
const VectorD< D > & get_corner(unsigned int i) const
For 0 return lower corner and 1 upper corner.
Rotation2D compose(const Rotation2D &a, const Rotation2D &b)
compose two rotations a and b
BoundingBoxD< 3 > get_transformed(const BoundingBoxD< 3 > &bb, const Transformation3D &tr)
Return a bounding box containing the transformed box.
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
Transformation3D get_rotation_about_point(const Vector3D &point, const Rotation3D &rotation)
Generate a Transformation3D object from a rotation around a point.
A bounding box in D dimensions.
Transformation3D compose(const Transformation3D &a, const Transformation3D &b)
compose two transformations
Simple 3D rotation class.
Transformation3D get_identity_transformation_3d()
Return a transformation that does not do anything.
Transformation3D get_transformation_3d(const Transformation2D &t2d)
Builds a 3D transformation from a 2D one.
Rotation3D get_identity_rotation_3d()
Return a rotation that does not do anything.
Transformation3D get_random_local_transformation(Vector3D origin, double max_translation=5., double max_angle_in_rad=0.26)
Get a local transformation.