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_ */
lvr2::DualLeaf::getMiddle
BaseVecT & getMiddle()
Returns the middle of the represented voxel.
lvr2::DualLeaf::calcIntersection
float calcIntersection(float x1, float x2, float d1, float d2)
Interpolates the intersection between x1 and x1.
lvr2::DualLeaf::getIntersection
uint getIntersection(char i)
Returns the stored intersection between the cell and the surface at a given edge.
lvr2::DualLeaf::getIntersectionPoint
BaseVecT getIntersectionPoint(float intersection, BaseVecT corner_one, BaseVecT corner_two)
OctreeTables.hpp
lvr2::DualLeaf::setIntersection
void setIntersection(char i, uint value)
Sets the intersection between the cell and the surface at a given edge.
lvr2::DualLeaf::getVertices
void getVertices(BaseVecT corners[])
Returns edges of the voxel.
lvr2::DualLeaf::getIndex
int getIndex(float distances[])
Calculates and returns the bit-pattern respectively index from the edges of the represented voxel for...
lvr2::DualLeaf::getIntersections
void getIntersections(BaseVecT corners[], float distance[], BaseVecT positions[])
Calculates the twelve possible intersections between the cell and the surface to interpolate.
lvr2::DualLeaf::DualLeaf
DualLeaf(BaseVecT vertices[])
Constructor.
lvr2::DualLeaf::m_vertices
BaseVecT m_vertices[8]
Definition: DualOctree.hpp:129
lvr2::DualLeaf
Definition: DualOctree.hpp:45
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::DualLeaf::~DualLeaf
virtual ~DualLeaf()
Destructor (virtual)
Definition: DualOctree.hpp:59
uint
unsigned int uint
Definition: Model.hpp:46
lvr2::DualLeaf::m_intersections
uint m_intersections[12]
Definition: DualOctree.hpp:132


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