Template Class Interpolator

Class Documentation

template <typename VoxelType>
class Interpolator

Interpolates voxels to give distances and gradients.

Public Types

typedef std::shared_ptr<Interpolator> Ptr

Public Functions

Interpolator(const Layer<VoxelType> *layer)
bool getGradient(const Point &pos, Point *grad, const bool interpolate = false) const
bool getDistance(const Point &pos, FloatingPoint *distance, bool interpolate = false) const
bool getVoxel(const Point &pos, VoxelType *voxel, bool interpolate = false) const
bool getAdaptiveDistanceAndGradient(const Point &pos, FloatingPoint *distance, Point *grad) const

This tries to use whatever information is available to interpolate the distance and gradient if only one side is available, for instance, this will still estimate a 1-sided gradient.

Should give the same results as getGradient() and getDistance() if all neighbors are filled.

bool getNearestDistanceAndWeight(const Point &pos, FloatingPoint *distance, float *weight) const

Without interpolation.