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(
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_ */
PointsetSurface.hpp
lvr2::SharpBox::m_theta_sharp
static float m_theta_sharp
Definition: SharpBox.hpp:90
lvr2::BoxTraits
Definition: FastBox.hpp:55
FastBox.hpp
ExtendedMCTable.hpp
lvr2::BoxTraits< SharpBox< BaseVecT > >::type
static const string type
Definition: SharpBox.hpp:131
lvr2::FastBox
A volume representation used by the standard Marching Cubes implementation.
Definition: FastBox.hpp:65
MCTable.hpp
lvr2::PointsetSurfacePtr
std::shared_ptr< PointsetSurface< BaseVecT > > PointsetSurfacePtr
Definition: PointsetSurface.hpp:161
lvr2::SharpBox::m_containsSharpCorner
bool m_containsSharpCorner
Definition: SharpBox.hpp:101
lvr2::SharpBox::BoxType
SharpBox< BaseVecT > BoxType
Definition: SharpBox.hpp:125
lvr2::SharpBox::~SharpBox
virtual ~SharpBox()
lvr2::SharpBox::m_containsSharpFeature
bool m_containsSharpFeature
Definition: SharpBox.hpp:97
lvr2::Normal< typename BaseVecT::CoordType >
lvr2::SharpBox::getSurface
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
lvr2::SharpBox::getSurface
virtual void getSurface(std::vector< float > &vBuffer, std::vector< unsigned int > &fBuffer, vector< QueryPoint< BaseVecT > > &query_points, uint &globalIndex)
Definition: SharpBox.hpp:74
lvr2::BoundingBox
A dynamic bounding box class.
Definition: BoundingBox.hpp:49
lvr2::QueryPoint
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a 'd...
Definition: QueryPoint.hpp:48
lvr2::SharpBox::m_phi_corner
static float m_phi_corner
Definition: SharpBox.hpp:93
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::SharpBox::getNormals
void getNormals(BaseVecT vertex_positions[], Normal< typename BaseVecT::CoordType > vertex_normals[])
gets the normals for the given vertices
lvr2::BaseMesh
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
lvr2::SharpBox
Used for extended marching cubes Reconstruction.
Definition: SharpBox.hpp:53
lvr2::SharpBox::detectSharpFeatures
void detectSharpFeatures(BaseVecT vertex_positions[], Normal< typename BaseVecT::CoordType > vertex_normals[], uint index)
lvr2::SharpBox::getSurface
virtual void getSurface(BaseMesh< BaseVecT > &mesh, vector< QueryPoint< BaseVecT > > &query_points, uint &globalIndex)
Performs a local reconstruction w.r.t. to sharp features.
lvr2::SharpBox::m_surface
static PointsetSurfacePtr< BaseVecT > m_surface
Definition: SharpBox.hpp:108
uint
unsigned int uint
Definition: Model.hpp:46
lvr2::SharpBox::m_extendedMCIndex
uint m_extendedMCIndex
Definition: SharpBox.hpp:105
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::SharpBox::SharpBox
SharpBox(BaseVecT center)


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 Wed Mar 2 2022 00:37:25