OpenVDB  2.0.0
Public Member Functions | List of all members
ClosestSurfacePoint< GridT > Class Template Reference

Accelerated closest surface point queries for narrow band level sets. Supports queries that originate at arbitrary worldspace locations, is not confined to the narrow band region of the input volume geometry. More...

#include <VolumeToSpheres.h>

Public Member Functions

 ClosestSurfacePoint ()
 
template<typename InterrupterT >
void initialize (const GridT &grid, float isovalue=0.0, InterrupterT *interrupter=NULL)
 Extracts the surface points and constructs a spatial acceleration structure. More...
 
void initialize (const GridT &grid, float isovalue=0.0)
 initialize method variant that automatically infers the util::NullInterrupter. More...
 
bool search (const std::vector< Vec3R > &points, std::vector< float > &distances)
 Computes distance to closest surface. More...
 
bool searchAndReplace (std::vector< Vec3R > &points, std::vector< float > &distances)
 Performs closest point searches. More...
 

Detailed Description

template<typename GridT>
class openvdb::v2_0_0::tools::ClosestSurfacePoint< GridT >

Accelerated closest surface point queries for narrow band level sets. Supports queries that originate at arbitrary worldspace locations, is not confined to the narrow band region of the input volume geometry.

Constructor & Destructor Documentation

Member Function Documentation

void initialize ( const GridT &  grid,
float  isovalue = 0.0,
InterrupterT *  interrupter = NULL 
)

Extracts the surface points and constructs a spatial acceleration structure.

Parameters
grida scalar gird, level set or fog volume.
isovaluethe crossing point of the volume values that is considered the surface. The zero default value works for signed distance fields while fog volumes require a larger positive value, 0.5 is a good initial guess.
interruptera pointer adhering to the util::NullInterrupter interface.
void initialize ( const GridT &  grid,
float  isovalue = 0.0 
)

initialize method variant that automatically infers the util::NullInterrupter.

bool search ( const std::vector< Vec3R > &  points,
std::vector< float > &  distances 
)

Computes distance to closest surface.

Parameters
pointssearch locations in world space.
distanceslist of closest surface point distances, populated by this method.
bool searchAndReplace ( std::vector< Vec3R > &  points,
std::vector< float > &  distances 
)

Performs closest point searches.

Parameters
pointssearch locations in world space to be replaced by their closest surface point.
distanceslist of closest surface point distances, populated by this method.

The documentation for this class was generated from the following file: