TetraederBox.hpp
Go to the documentation of this file.
1 
35 #ifndef TETRAEDERBOX_H_
36 #define TETRAEDERBOX_H_
37 
38 
39 #include "FastBox.hpp"
40 
41 namespace lvr2
42 {
43 
48 template<typename BaseVecT>
49 class TetraederBox : public FastBox<BaseVecT>
50 {
51 public:
52 
55  TetraederBox(BaseVecT center);
56  virtual ~TetraederBox();
57 
69  virtual void getSurface(
71  vector<QueryPoint<BaseVecT>>& query_points,
72  uint &globalIndex
73  );
74 
75 // virtual void getSurface(
76 // BaseMesh<BaseVecT>& mesh,
77 // vector<QueryPoint<BaseVecT>>& query_points,
78 // uint& globalIndex,
79 // BoundingBox<BaseVecT>& bb,
80 // vector<unsigned int>& duplicates,
81 // float comparePrecision
82 // );
83 
84 private:
85 
86  int calcPatternIndex(float distances[4])
87  {
88  int index = 0;
89  for(int i = 0; i < 4; i++)
90  {
91  if(distances[i] > 0) index |= (1 << i);
92  }
93  return index;
94  }
95 
96  inline void interpolateIntersections(
97  int tetraNumber,
98  BaseVecT positions[4],
99  float distances[4]
100  );
101 
104 
105 };
106 
107 } /* namespace lvr */
108 
109 #include "TetraederBox.tcc"
110 
111 #endif /* TETRAEDERBOX_H_ */
HalfEdgeMesh< Vec > mesh
BaseVecT m_intersectionPositionsTetraeder[6]
Used for Marching Tetreader Reconstruction. Dives a regular box into 5 Tetraeders for mesh generation...
virtual void getSurface(BaseMesh< BaseVecT > &mesh, vector< QueryPoint< BaseVecT >> &query_points, uint &globalIndex)
Performs a local reconstruction using a tetraeder decomposition of the current cell.
Semantically equivalent to boost::optional<VertexHandle>
Definition: Handles.hpp:176
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a &#39;d...
Definition: QueryPoint.hpp:48
OptionalVertexHandle m_intersections[19]
void interpolateIntersections(int tetraNumber, BaseVecT positions[4], float distances[4])
unsigned int uint
Definition: Model.hpp:46
A volume representation used by the standard Marching Cubes implementation.
Definition: FastBox.hpp:65
int calcPatternIndex(float distances[4])
TetraederBox(BaseVecT center)
virtual ~TetraederBox()


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