OpenVDB 3.2.0

Public Types | 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 world-space locations, is not confined to the narrow band region of the input volume geometry. More...

`#include <VolumeToSpheres.h>`

## Public Types
typedef GridT::TreeType | TreeT
typedef TreeT::template ValueConverter< bool >::Type | BoolTreeT
typedef TreeT::template ValueConverter< Index32 >::Type | Index32TreeT
typedef TreeT::template ValueConverter< Int16 >::Type | Int16TreeT

## 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...
const Index32TreeT & | indexTree () const
| Tree accessors. More...
const Int16TreeT & | signTree () const
| Tree accessors. More...

## Detailed Description

### template<typename GridT>
class openvdb::v3_2_0::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.

## Member Typedef Documentation

## ◆ BoolTreeT

typedef TreeT::template ValueConverter<bool>::Type BoolTreeT

## ◆ Index32TreeT

typedef TreeT::template ValueConverter<Index32>::Type Index32TreeT

## ◆ Int16TreeT

typedef TreeT::template ValueConverter<Int16>::Type Int16TreeT

## ◆ TreeT

typedef GridT::TreeType TreeT

## Constructor & Destructor Documentation

## ◆ ClosestSurfacePoint()

ClosestSurfacePoint | ( |  | ) |

## Member Function Documentation

## ◆ indexTree()

const Index32TreeT& indexTree | ( |  | ) | const
| inline

Tree accessors.

## ◆ initialize() [1/2]

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

Extracts the surface points and constructs a spatial acceleration structure.

Parameters

  grid | a scalar gird, level set or fog volume.
  isovalue | the 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.
  interrupter | a pointer adhering to the util::NullInterrupter interface.

## ◆ initialize() [2/2]

void initialize | ( | const GridT & | grid,
|  | float | isovalue = `0.0`
| ) |  |

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

## ◆ search()

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

Computes distance to closest surface.

Parameters

  points | search locations in world space.
  distances | list of closest surface point distances, populated by this method.

## ◆ searchAndReplace()

bool searchAndReplace | ( | std::vector< Vec3R > & | points,
|  | std::vector< float > & | distances
| ) |  |

Performs closest point searches.

Parameters

  points | search locations in world space to be replaced by their closest surface point.
  distances | list of closest surface point distances, populated by this method.

## ◆ signTree()

const Int16TreeT& signTree | ( |  | ) | const
| inline

Tree accessors.

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

- VolumeToSpheres.h