TransformerConstructor.h
Go to the documentation of this file.
1 
9 #ifndef _utl_TransformerConstructor_h_
10 #define _utl_TransformerConstructor_h_
11 
12 
13 #include <utl/CoordinateSystemPtr.h>
14 #include <utl/TransformationMatrix.h>
15 #include <utl/Transformation-fwd.h>
16 
17 namespace utl {
18 
19  class Vector;
20  class Point;
21 
35  template<typename Policy>
36  class TransformerConstructor
37  : public Policy
38  {
39  public:
42 
43  // Factory functions
44 
46  static typename Policy::type
47  Translation(const Vector& theTranslation,
48  const CoordinateSystemPtr& theCS);
49 
51  static typename Policy::type
52  Rotation(const double angle,
53  const Vector& theAxis,
54  const CoordinateSystemPtr& theCS);
55 
57  static typename Policy::type
58  RotationX(const double angle, const CoordinateSystemPtr& theCS);
59 
61  static typename Policy::type
62  RotationY(const double angle, const CoordinateSystemPtr& theCS);
63 
65  static typename Policy::type
66  RotationZ(const double angle, const CoordinateSystemPtr& theCS);
67 
75  static typename Policy::type
76  FromTransformation(const TransformationMatrix& theTrafo,
77  const CoordinateSystemPtr& theCS);
78 
79  private:
80  TransformerConstructor(const TransformationMatrix& theTransformation,
81  const CoordinateSystemPtr& theCS);
82 
83  // some Policies need access to the constructor of this class
84  friend typename Policy::type
85  Policy::FromTransformation(const TransformationMatrix&,
86  const CoordinateSystemPtr&);
87  };
88 
89 
90 } // utl
91 
92 
93 #endif // _utl_TransformerConstructor_h_
94 
95 // Configure (x)emacs for this file ...
96 // Local Variables:
97 // mode:c++
98 // compile-command: "make -C .. -k"
99 // End:
static Policy::type Rotation(const double angle, const Vector &theAxis, const CoordinateSystemPtr &theCS)
Construct from general rotation about axis.
friend Policy::type Policy::FromTransformation(const TransformationMatrix &, const CoordinateSystemPtr &)
boost::shared_ptr< const CoordinateTransformer > CoordinateSystemPtr
Shared pointer for coordinate systems.
static Policy::type RotationY(const double angle, const CoordinateSystemPtr &theCS)
Construct from rotation about Y axis.
TransformerConstructor(const TransformationMatrix &theTransformation, const CoordinateSystemPtr &theCS)
static Policy::type RotationZ(const double angle, const CoordinateSystemPtr &theCS)
Construct from rotation about Z axis.
static Policy::type Translation(const Vector &theTranslation, const CoordinateSystemPtr &theCS)
Construct from translation by vector.
static Policy::type FromTransformation(const TransformationMatrix &theTrafo, const CoordinateSystemPtr &theCS)
Construct from transformation matrix.
~TransformerConstructor()
Destructor - should be virtual for base classes.
static Policy::type RotationX(const double angle, const CoordinateSystemPtr &theCS)
Construct from rotation about X axis.

, generated on Tue Sep 26 2023.