Program Listing for File FastReconstruction.hpp

Return to documentation for file (include/lvr2/reconstruction/FastReconstruction.hpp)

 /*
 * FastReconstruction.h
 *
 *  Created on: 16.02.2011
 *      Author: Thomas Wiemann
 */

#ifndef _LVR2_RECONSTRUCTION_FASTRECONSTRUCTION_H_
#define _LVR2_RECONSTRUCTION_FASTRECONSTRUCTION_H_

#include "lvr2/geometry/BaseMesh.hpp"
#include "lvr2/geometry/BoundingBox.hpp"

//#include "PointsetMeshGenerator.hpp"
#include "LocalApproximation.hpp"
#include "FastBox.hpp"
#include "./SharpBox.hpp"
#include "BilinearFastBox.hpp"
#include "QueryPoint.hpp"
#include "PointsetSurface.hpp"
#include "HashGrid.hpp"


#include <unordered_map>
#include <memory>

using std::shared_ptr;
using std::unordered_map;

namespace lvr2
{

template<typename BaseVecT>
class FastReconstructionBase
{
public:
    virtual void getMesh(BaseMesh<BaseVecT> &mesh) = 0;

    virtual void getMesh(
        BaseMesh<BaseVecT>& mesh,
        BoundingBox<BaseVecT>& bb,
        vector<unsigned int>& duplicates,
        float comparePrecision
    ) = 0;

    virtual ~FastReconstructionBase() = default;
};

template<typename BaseVecT, typename BoxT>
class FastReconstruction : public FastReconstructionBase<BaseVecT>
{
public:

    FastReconstruction(shared_ptr<HashGrid<BaseVecT, BoxT>> grid);


    virtual ~FastReconstruction() {};

    virtual void getMesh(BaseMesh<BaseVecT> &mesh);

    virtual void getMesh(
        BaseMesh<BaseVecT>& mesh,
        BoundingBox<BaseVecT>& bb,
        vector<unsigned int>& duplicates,
        float comparePrecision
    );

private:

    shared_ptr<HashGrid<BaseVecT, BoxT>> m_grid;
};


} // namespace lvr2


#include "lvr2/reconstruction/FastReconstruction.tcc"

#endif /* _LVR2_RECONSTRUCTION_FASTRECONSTRUCTION_H_ */