9 #ifndef IMPALGEBRA_REFERENCE_FRAME_3D_H
10 #define IMPALGEBRA_REFERENCE_FRAME_3D_H
12 #include <IMP/algebra/algebra_config.h>
13 #include <cereal/access.hpp>
16 IMPALGEBRA_BEGIN_NAMESPACE
24 mutable bool has_inverse_;
27 friend class cereal::access;
29 template<
class Archive>
void save(Archive &ar)
const {
33 template<
class Archive>
void load(Archive &ar) {
40 tri_ = tr_.get_inverse();
62 : tr_(tr), has_inverse_(false) {}
84 return tr_.get_transformed(v);
90 return get_inverse().get_transformed(v);
115 inline Transformation3D get_transformation_from_first_to_second(
116 const ReferenceFrame3D &a,
const ReferenceFrame3D &b) {
117 return b.get_transformation_to() * a.get_transformation_from();
120 IMPALGEBRA_END_NAMESPACE
#define IMP_SHOWABLE_INLINE(Name, how_to_show)
Declare the methods needed by an object that can be printed.
const Transformation3D & get_transformation_from() const
Return the transformation from global to local coordinates.
ReferenceFrame3D get_local_reference_frame(const ReferenceFrame3D &v) const
ReferenceFrame3D get_global_reference_frame(const ReferenceFrame3D &v) const
#define IMP_VALUES(Name, PluralName)
Define the type for storing sets of values.
Vector3D get_local_coordinates(const Vector3D &v) const
const Transformation3D & get_transformation_to() const
Return transformation from local to global coordinates.
Transformation3D get_identity_transformation_3d()
Return a transformation that does not do anything.
ReferenceFrame3D()
Create the default reference frame.
Vector3D get_global_coordinates(const Vector3D &v) const
DensityMap * get_transformed(const DensityMap *input, const algebra::Transformation3D &tr, double threshold)
Return a new density map containing a rotated version of the old one.
ReferenceFrame3D(const Transformation3D &tr)
A reference frame specified by a transformation matrix.