Transformation.h
Go to the documentation of this file.
1 
9 #ifndef _utl_Transformation_h_
10 #define _utl_Transformation_h_
11 
12 
13 #include <utl/TransformationMatrix.h>
14 #include <utl/CoordinateSystem.h>
15 #include <utl/TransformerConstructor-fwd.h>
16 #ifdef OFFLINE_GEOMETRY_IS_COUNTED
17 #include <utl/CountedObject.h>
18 #endif
19 
20 #include <boost/operators.hpp>
21 
22 namespace utl {
23 
37  class TransformationPolicy : public boost::multipliable<TransformationPolicy>
38 #ifdef OFFLINE_GEOMETRY_IS_COUNTED
39  , private CountedObject<TransformationPolicy>
40 #endif
41  {
42  public:
44 
47 
50  const CoordinateSystemPtr& theCoordinateSystem);
51 
53  void
54  TransformTo(const CoordinateSystemPtr& newCoordinateSystem)
55  const
56  {
57  if (newCoordinateSystem != fCoordinateSystem)
58  UncheckedTransformTo(newCoordinateSystem);
59  }
60 
62  double Distance(const TransformationPolicy& theTransformation) const;
63 
65 
66  template<typename V>
67  V operator*(const V& rhs) const;
68 
69  protected:
71  static type FromTransformation(const TransformationMatrix& theTrafo,
72  const CoordinateSystemPtr& theCS);
73 
74  private:
75  void UncheckedTransformTo(const CoordinateSystemPtr& newCoordinateSystem) const;
76 
79  };
80 
81 } // utl
82 
83 
84 #endif // _utl_Transformation_h_
85 
86 // Configure (x)emacs for this file ...
87 // Local Variables:
88 // mode:c++
89 // compile-command: "make -C .. -k"
90 // End:
constexpr double V
Definition: AugerUnits.h:233
TransformationPolicy & operator*=(const TransformationPolicy &rhs)
Constructors for Transformer classes.
CoordinateSystemPtr fCoordinateSystem
TransformationMatrix fTransformation
Transformations matrices for afine transformations.
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
static type FromTransformation(const TransformationMatrix &theTrafo, const CoordinateSystemPtr &theCS)
Generic factory for post-processing.
double Distance(const TransformationPolicy &theTransformation) const
Metric on space of transformations.
TransformationPolicy()
The default constructor creates the id in the root coordinate system.
void UncheckedTransformTo(const CoordinateSystemPtr &newCoordinateSystem) const
V operator*(const V &rhs) const
Mix-in class for counting creation and destruction of objects.
Definition: CountedObject.h:30

, generated on Tue Sep 26 2023.