OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OMTransformationSolver.h
Go to the documentation of this file.
1 //==============================================================================
14 #ifndef _OM_TRANSFORMATION_SOLVER_H_
15 #define _OM_TRANSFORMATION_SOLVER_H_
16 
17 #include <Eigen/Geometry>
18 
19 namespace OMToolkit
20 {
21  using namespace Eigen;
22  using namespace OpenMesh;
23 
28  template <class Vector>
30  {
31  protected:
35  typedef typename Vector VectorT;
36 
40  typedef typename Vector::value_type ScalarT;
41 
45  typedef typename Matrix<ScalarT, 3, 1, 2, 3, 1> VectorEigen;
46 
47  public:
58  OMTransformationSolver(ScalarT matrixLength, ScalarT resolution, VectorT normal, VectorT direction, VectorT origin);
59 
65  inline VectorT transformTo2D(VectorT point);
66 
72  inline VectorT transformToMesh(VectorT point);
73 
79  inline VectorT transformTo2DLinear(VectorT vector);
80 
86  inline VectorT transformToMeshLinear(VectorT vector);
87 
92  inline VectorT getMaxBounds();
93 
97  inline ScalarT getPixelSize();
98 
106  static inline ScalarT vectorSignedAngle(VectorT& vec1, VectorT& vec2, VectorT reference);
107 
114  static inline ScalarT vectorAngle(VectorT& vec1, VectorT& vec2);
115 
116  protected:
117 
121  Transform<ScalarT, 3> m_2DToModel;
122 
126  Transform<ScalarT, 3> m_modelTo2D;
127 
132 
137 
142  };
143 
145 }
146 
147 #endif