Template Class PointsetSurface
Defined in File PointsetSurface.hpp
Inheritance Relationships
Derived Types
public lvr2::AdaptiveKSearchSurface< BaseVecT >(Template Class AdaptiveKSearchSurface)public lvr2::CudaKSearchSurface< BaseVecT >(Template Class CudaKSearchSurface)
Class Documentation
-
template<typename BaseVecT>
class PointsetSurface An interface class to wrap all functionality that is needed to generate a surface approximation from point cloud data.
Classes that implement this interface can be used for Marching Cubes based mesh generation algorithms in via the SurfaceReconstruction interface.
Subclassed by lvr2::AdaptiveKSearchSurface< BaseVecT >, lvr2::CudaKSearchSurface< BaseVecT >
Public Functions
-
virtual pair<typename BaseVecT::CoordType, typename BaseVecT::CoordType> distance(BaseVecT v) const = 0
Returns the distance of vertex v from the nearest tangent plane.
- Parameters:
p – A grid point
- Returns:
The first value is the projected distance from the query point to the isosurface. The second value is the euclidian distance to the nearest data point.
-
virtual void calculateSurfaceNormals() = 0
Calculates surface normals for each data point in the given PointBuffeer. If the buffer alreay contains normal information it will be overwritten with the new normals.
-
virtual Normal<float> getInterpolatedNormal(const BaseVecT &position) const
Interpolates a surface normal at the given position.
- Parameters:
position – the position to calculate a normal for
- Returns:
The normal
-
virtual PointBufferPtr pointBuffer() const
Returns the internal point buffer. After a call of calculateSurfaceNormals the buffer will contain normal information.
-
std::shared_ptr<SearchTree<BaseVecT>> searchTree() const
Returns a pointer to the search tree.
-
const BoundingBox<BaseVecT> &getBoundingBox() const
Returns the bounding box of the point set.
-
inline void setKi(int k)
If k is > 0, each normal will be averaged with its k neighbors.
-
inline void setKn(int k)
Sets the size of the k-neighborhood that is used for normal estimation.
-
inline void setKd(int k)
Sets the number of points that is used for distance evaluation, i.e. an average of the distance to the k nearest data points is given (useful in noisy data sets).
Protected Functions
-
PointsetSurface(PointBufferPtr pointcloud)
Constructor. Stores the given buffer pointer. If the point buffer does not contain surface normals, you will have to call calculateSurfaceNormals before the first call @distance.
-
PointsetSurface() = delete
Protected Attributes
-
PointBufferPtr m_pointBuffer
The point cloud used for surface approximation.
-
std::shared_ptr<SearchTree<BaseVecT>> m_searchTree
The search tree that is built from the point cloud data.
-
BoundingBox<BaseVecT> m_boundingBox
The bounding box of the point cloud.
-
int m_kn
The number of points used for normal estimation.
-
int m_ki
The number of points used for normal interpolation.
-
int m_kd
The number of points used for distance function evaluation.
-
virtual pair<typename BaseVecT::CoordType, typename BaseVecT::CoordType> distance(BaseVecT v) const = 0