HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT > Class Template Reference

Accelerated closest surface point queries for narrow band level sets. More...

#include <VolumeToSpheres.h>

Public Types

using TreeT = typename GridT::TreeType
 
using BoolTreeT = typename TreeT::template ValueConverter< bool >::Type
 
using Index32TreeT = typename TreeT::template ValueConverter< Index32 >::Type
 
using Int16TreeT = typename TreeT::template ValueConverter< Int16 >::Type
 

Public Member Functions

 ClosestSurfacePoint ()
 
template<typename InterrupterT = util::NullInterrupter>
bool initialize (const GridT &grid, float isovalue=0.0, InterrupterT *interrupter=nullptr)
 Extract surface points and construct a spatial acceleration structure. More...
 
bool search (const std::vector< Vec3R > &points, std::vector< float > &distances)
 Compute the distance from each input point to its closest surface point. More...
 
bool searchAndReplace (std::vector< Vec3R > &points, std::vector< float > &distances)
 Overwrite each input point with its closest surface point. More...
 
const Index32TreeTindexTree () const
 Tree accessor. More...
 
const Int16TreeTsignTree () const
 Tree accessor. More...
 

Detailed Description

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

Accelerated closest surface point queries for narrow band level sets.

Supports queries that originate at arbitrary world-space locations, is not confined to the narrow band region of the input volume geometry.

Definition at line 98 of file VolumeToSpheres.h.

Member Typedef Documentation

template<typename GridT>
using openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::BoolTreeT = typename TreeT::template ValueConverter<bool>::Type

Definition at line 102 of file VolumeToSpheres.h.

template<typename GridT>
using openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::Index32TreeT = typename TreeT::template ValueConverter<Index32>::Type

Definition at line 103 of file VolumeToSpheres.h.

template<typename GridT>
using openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::Int16TreeT = typename TreeT::template ValueConverter<Int16>::Type

Definition at line 104 of file VolumeToSpheres.h.

template<typename GridT>
using openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::TreeT = typename GridT::TreeType

Definition at line 101 of file VolumeToSpheres.h.

Constructor & Destructor Documentation

Definition at line 793 of file VolumeToSpheres.h.

Member Function Documentation

template<typename GridT>
const Index32TreeT& openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::indexTree ( ) const
inline

Tree accessor.

Definition at line 132 of file VolumeToSpheres.h.

template<typename GridT >
template<typename InterrupterT >
bool openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::initialize ( const GridT &  grid,
float  isovalue = 0.0,
InterrupterT *  interrupter = nullptr 
)

Extract surface points and construct a spatial acceleration structure.

Returns
false if the initialization fails for any reason.
Parameters
grida scalar level set or fog volume
isovaluethe voxel value that determines the surface of the volume The default value of zero works for signed distance fields, while fog volumes require a larger positive value (0.5 is a good initial guess).
interrupterpointer to an object adhering to the util::NullInterrupter interface.

Definition at line 806 of file VolumeToSpheres.h.

template<typename GridT >
bool openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::search ( const std::vector< Vec3R > &  points,
std::vector< float > &  distances 
)

Compute the distance from each input point to its closest surface point.

Parameters
pointsinput list of points in world space
distancesoutput list of closest surface point distances

Definition at line 967 of file VolumeToSpheres.h.

template<typename GridT >
bool openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::searchAndReplace ( std::vector< Vec3R > &  points,
std::vector< float > &  distances 
)

Overwrite each input point with its closest surface point.

Parameters
pointsinput/output list of points in world space
distancesoutput list of closest surface point distances

Definition at line 975 of file VolumeToSpheres.h.

template<typename GridT>
const Int16TreeT& openvdb::OPENVDB_VERSION_NAME::tools::ClosestSurfacePoint< GridT >::signTree ( ) const
inline

Tree accessor.

Definition at line 134 of file VolumeToSpheres.h.


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