9 #ifndef IMPALGEBRA_REFERENCE_FRAME_3D_H
10 #define IMPALGEBRA_REFERENCE_FRAME_3D_H
12 #include <IMP/algebra/algebra_config.h>
13 #include <boost/serialization/access.hpp>
14 #include <boost/serialization/split_member.hpp>
17 IMPALGEBRA_BEGIN_NAMESPACE
25 mutable bool has_inverse_;
29 friend class boost::serialization::access;
31 template<
class Archive>
void save(Archive &ar,
const unsigned int)
const {
35 template<
class Archive>
void load(Archive &ar,
const unsigned int) {
40 BOOST_SERIALIZATION_SPLIT_MEMBER()
45 tri_ = tr_.get_inverse();
67 : tr_(tr), has_inverse_(false) {}
89 return tr_.get_transformed(v);
95 return get_inverse().get_transformed(v);
120 inline Transformation3D get_transformation_from_first_to_second(
121 const ReferenceFrame3D &a,
const ReferenceFrame3D &b) {
122 return b.get_transformation_to() * a.get_transformation_from();
125 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.