Go to the documentation of this file.
35 #ifndef _LVR2_RECONSTRUCTION_FASTBOX_H_
36 #define _LVR2_RECONSTRUCTION_FASTBOX_H_
49 using std::numeric_limits;
54 template<
typename BoxT>
64 template<
typename BaseVecT>
136 vector<unsigned int>& duplicates,
137 float comparePrecision
162 if(fabs(num1 - num2) < std::numeric_limits<double>::epsilon())
181 void getIntersections(BaseVecT* corners,
float* distance, BaseVecT* positions);
223 #include "lvr2/reconstruction/FastBox.tcc"
void getDistances(float distances[], vector< QueryPoint< BaseVecT >> &query_points)
Calculates the distance value for the eight cell corners.
void getCorners(BaseVecT corners[], vector< QueryPoint< BaseVecT >> &query_points)
Calculates the position of the eight cell corners.
OptionalVertexHandle m_intersections[12]
The twelve intersection between box and surface.
Semantically equivalent to boost::optional<VertexHandle>
virtual ~FastBox()
Destructor.NormalT.
FastBox< BaseVecT > * m_neighbors[27]
Pointer to all adjacent cells.
A volume representation used by the standard Marching Cubes implementation.
FastBox(BaseVecT center)
Constructs a new box at the given center point defined by the used m_voxelsize}.
void setVertex(int index, uint value)
Each cell vertex (0 to 7) as associated with a vertex in the reconstruction grid. This methods assign...
float calcIntersection(float x1, float x2, float d1, float d2)
FastBox< BaseVecT > BoxType
bool compareFloat(double num1, double num2)
void setNeighbor(int index, FastBox< BaseVecT > *cell)
Adjacent cells in the grid should use common vertices. This functions assigns the value of corner[ind...
static uint INVALID_INDEX
An index value that is used to reference vertices that are not in the grid.
float distanceToBB(const BaseVecT &v, const BoundingBox< BaseVecT > &bb) const
uint m_vertices[8]
The eight box corners.
BaseVecT m_center
The box center.
static float m_voxelsize
The voxelsize of the reconstruction grid.
int getIndex(vector< QueryPoint< BaseVecT >> &query_points)
Calculated the index for the MC table.
uint getVertex(int index)
Gets the vertex index of the queried cell corner.
A dynamic bounding box class.
virtual void getSurface(BaseMesh< BaseVecT > &mesh, vector< QueryPoint< BaseVecT >> &query_points, uint &globalIndex)
Performs a local reconstruction according to the standard Marching Cubes table from Paul Bourke.
void getIntersections(BaseVecT *corners, float *distance, BaseVecT *positions)
Calculated the 12 possible intersections between the cell and the surface to interpolate.
A query Vector for marching cubes reconstructions. It represents a Vector in space together with a 'd...
Interface for triangle-meshes with adjacency information.
FastBox< BaseVecT > * getNeighbor(int index)
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