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_ */
FastBox.hpp
lvr2::OptionalVertexHandle
Semantically equivalent to boost::optional<VertexHandle>
Definition: Handles.hpp:176
lvr2::FastBox
A volume representation used by the standard Marching Cubes implementation.
Definition: FastBox.hpp:65
lvr2::TetraederBox::calcPatternIndex
int calcPatternIndex(float distances[4])
Definition: TetraederBox.hpp:86
lvr2::TetraederBox::getSurface
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.
lvr2::QueryPoint
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a 'd...
Definition: QueryPoint.hpp:48
lvr2::TetraederBox::~TetraederBox
virtual ~TetraederBox()
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::TetraederBox::interpolateIntersections
void interpolateIntersections(int tetraNumber, BaseVecT positions[4], float distances[4])
lvr2::TetraederBox
Used for Marching Tetreader Reconstruction. Dives a regular box into 5 Tetraeders for mesh generation...
Definition: TetraederBox.hpp:49
lvr2::BaseMesh
Interface for triangle-meshes with adjacency information.
Definition: BaseMesh.hpp:140
uint
unsigned int uint
Definition: Model.hpp:46
lvr2::TetraederBox::m_intersections
OptionalVertexHandle m_intersections[19]
Definition: TetraederBox.hpp:102
mesh
HalfEdgeMesh< Vec > mesh
Definition: src/tools/lvr2_gs_reconstruction/Main.cpp:26
lvr2::TetraederBox::m_intersectionPositionsTetraeder
BaseVecT m_intersectionPositionsTetraeder[6]
Definition: TetraederBox.hpp:103
lvr2::TetraederBox::TetraederBox
TetraederBox(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