DualOctree.hpp
Go to the documentation of this file.
1 
28  /*
29  * DualOctree.hpp
30  *
31  * Created on: 18.01.2019
32  * Author: Benedikt Schumacher
33  */
34 
35 #ifndef DualOctree_HPP_
36 #define DualOctree_HPP_
37 
38 #include <boost/thread.hpp>
39 #include "OctreeTables.hpp"
40 
41 namespace lvr2
42 {
43 
44 template<typename BaseVecT, typename BoxT>
45 class DualLeaf
46 {
47 public:
48 
54  DualLeaf(BaseVecT vertices[]);
55 
59  virtual ~DualLeaf(){};
60 
67  int getIndex(float distances[]);
68 
69  BaseVecT getIntersectionPoint(float intersection, BaseVecT corner_one, BaseVecT corner_two);
70  BaseVecT getIntersectionPoint(BaseVecT corner_one, float intersection, BaseVecT corner_two);
71  BaseVecT getIntersectionPoint(BaseVecT corner_one, BaseVecT corner_two, float intersection);
72 
80  void getIntersections(
81  BaseVecT corners[],
82  float distance[],
83  BaseVecT positions[]);
84 
90  void getVertices(
91  BaseVecT corners[]);
92 
98  uint getIntersection(char i);
99 
105  BaseVecT& getMiddle();
106 
113  void setIntersection(char i, uint value);
114 
115 protected:
116 
126  float calcIntersection(float x1, float x2, float d1, float d2);
127 
128  // Vertices of the represented voxel.
129  BaseVecT m_vertices[8];
130 
131  // Twelve possible intersections.
133 };
134 
135 }
136 
137 #include "DualOctree.tcc"
138 
139 #endif /* DualOctree_HPP_ */
BaseVecT m_vertices[8]
Definition: DualOctree.hpp:129
uint getIntersection(char i)
Returns the stored intersection between the cell and the surface at a given edge. ...
void getVertices(BaseVecT corners[])
Returns edges of the voxel.
BaseVecT & getMiddle()
Returns the middle of the represented voxel.
uint m_intersections[12]
Definition: DualOctree.hpp:132
DualLeaf(BaseVecT vertices[])
Constructor.
void setIntersection(char i, uint value)
Sets the intersection between the cell and the surface at a given edge.
int getIndex(float distances[])
Calculates and returns the bit-pattern respectively index from the edges of the represented voxel for...
unsigned int uint
Definition: Model.hpp:46
void getIntersections(BaseVecT corners[], float distance[], BaseVecT positions[])
Calculates the twelve possible intersections between the cell and the surface to interpolate.
virtual ~DualLeaf()
Destructor (virtual)
Definition: DualOctree.hpp:59
float calcIntersection(float x1, float x2, float d1, float d2)
Interpolates the intersection between x1 and x1.
BaseVecT getIntersectionPoint(float intersection, BaseVecT corner_one, BaseVecT corner_two)


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:06