SharpBox.hpp
Go to the documentation of this file.
1 
36 #ifndef SHARPBOX_H_
37 #define SHARPBOX_H_
38 
39 
40 #include "FastBox.hpp"
41 #include "MCTable.hpp"
42 #include <float.h>
43 #include "ExtendedMCTable.hpp"
44 #include "PointsetSurface.hpp"
45 
46 namespace lvr2
47 {
48 
52 template<typename BaseVecT>
53 class SharpBox : public FastBox<BaseVecT>
54 {
55 public:
56  SharpBox(BaseVecT center);
57  virtual ~SharpBox();
58 
69  virtual void getSurface(
71  vector<QueryPoint<BaseVecT> > &query_points,
72  uint &globalIndex);
73 
74  virtual void getSurface(
75  std::vector<float>& vBuffer,
76  std::vector<unsigned int>& fBuffer,
77  vector<QueryPoint<BaseVecT> > &query_points,
78  uint &globalIndex){}
79 
80  virtual void getSurface(
81  BaseMesh<BaseVecT> &mesh,
82  vector<QueryPoint<BaseVecT> > &query_points,
83  uint &globalIndex,
85  vector<unsigned int>& duplicates,
86  float comparePrecision
87  ){}
88 
89  // Threshold angle for sharp feature detection
90  static float m_theta_sharp;
91 
92  // Threshold angle for corner detection
93  static float m_phi_corner;
94 
95  // Indicates if the Box contains a Sharp Feature
96  // used for Edge Flipping
98 
99  // Indicates if the Box contains a Sharp Corner
100  // used for Edge Flipping
102 
103  // The surface index of the Extended MC-Table
104  // used for Edge Flipping
106 
107  // the point set surface
109 
110 private:
118  void getNormals(BaseVecT vertex_positions[],
119  Normal<typename BaseVecT::CoordType> vertex_normals[]);
120 
121  void detectSharpFeatures(BaseVecT vertex_positions[],
122  Normal<typename BaseVecT::CoordType> vertex_normals[], uint index);
123 
124 
126 };
127 
128 template<typename BaseVecT>
129 struct BoxTraits<SharpBox<BaseVecT> >
130 {
131  static const string type;
132 };
133 
134 
135 } /* namespace lvr */
136 
137 #include "SharpBox.tcc"
138 
139 #endif /* SHARPBOX_H_ */
virtual void getSurface(std::vector< float > &vBuffer, std::vector< unsigned int > &fBuffer, vector< QueryPoint< BaseVecT > > &query_points, uint &globalIndex)
Definition: SharpBox.hpp:74
bool m_containsSharpFeature
Definition: SharpBox.hpp:97
HalfEdgeMesh< Vec > mesh
static float m_phi_corner
Definition: SharpBox.hpp:93
void detectSharpFeatures(BaseVecT vertex_positions[], Normal< typename BaseVecT::CoordType > vertex_normals[], uint index)
static PointsetSurfacePtr< BaseVecT > m_surface
Definition: SharpBox.hpp:108
virtual void getSurface(BaseMesh< BaseVecT > &mesh, vector< QueryPoint< BaseVecT > > &query_points, uint &globalIndex)
Performs a local reconstruction w.r.t. to sharp features.
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
A dynamic bounding box class.
Definition: BoundingBox.hpp:49
uint m_extendedMCIndex
Definition: SharpBox.hpp:105
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a &#39;d...
Definition: QueryPoint.hpp:48
SharpBox(BaseVecT center)
void getNormals(BaseVecT vertex_positions[], Normal< typename BaseVecT::CoordType > vertex_normals[])
gets the normals for the given vertices
Used for extended marching cubes Reconstruction.
Definition: SharpBox.hpp:53
static float m_theta_sharp
Definition: SharpBox.hpp:90
unsigned int uint
Definition: Model.hpp:46
SharpBox< BaseVecT > BoxType
Definition: SharpBox.hpp:125
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
A volume representation used by the standard Marching Cubes implementation.
Definition: FastBox.hpp:65
virtual void getSurface(BaseMesh< BaseVecT > &mesh, vector< QueryPoint< BaseVecT > > &query_points, uint &globalIndex, BoundingBox< BaseVecT > &bb, vector< unsigned int > &duplicates, float comparePrecision)
Definition: SharpBox.hpp:80
virtual ~SharpBox()
bool m_containsSharpCorner
Definition: SharpBox.hpp:101


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:09