OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OMProjector.h
Go to the documentation of this file.
1 //==============================================================================
14 #ifndef _OM_PROJECTOR_H_
15 #define _OM_PROJECTOR_H_
16 
17 #include <OpenMesh\Core\Utils\Property.hh>
19 #include <MDSTk/Module/mdsModule.h>
20 #include <Eigen\LU>
22 #include <set>
23 #include <OMToolkit\OMTriBSPTree.h>
25 
26 namespace OMToolkit
27 {
32  template <class Point>
33  struct Rect
34  {
38  Point minimum;
39 
43  Point maximum;
44  };
45 
51  template <class Mesh, class Matrix>
53  {
54  protected:
58  typedef typename Matrix MatrixT;
59 
63  typedef typename MatrixT::Scalar ScalarT;
64 
68  typedef typename Mesh MeshT;
69 
73  typedef typename MeshT::Point PointT;
74 
78  typedef typename MeshT::VertexHandle VertexHandleT;
79 
83  typedef typename MeshT::FaceHandle FaceHandleT;
84 
88  typedef typename MeshT::Normal VectorT;
89 
90  public:
94  static const int XDIR_CURVATURE = 0;
95 
99  static const int XDIR_DO_NOT_CHECK = 2;
100 
104  static const int ZDIR_Z = 0;
105 
109  static const int ZDIR_CURVATURE = 2;
110 
114  static const int ZDIR_NORMAL = 4;
120  OMProjector(MeshT *mesh, OpenMesh::VPropHandleT<MatrixT> propertyHandle);
121 
131  bool ComputeMatrices(ScalarT length, ScalarT resolution, int zDir = ZDIR_Z, bool lengthRelative = false, int xdirection = XDIR_CURVATURE);
132 
133  public:
142 
150 
155 
160 
165 
166 
170  int m_zDir;
171 
175  OpenMesh::VPropHandleT<MatrixT> m_propertyHandle;
176 
181  };
182 #include <OMToolkit\OMProjector.hxx>
183 }
184 
185 #endif