HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Interpolation.h File Reference
#include <openvdb/version.h>
#include <openvdb/Platform.h>
#include <openvdb/math/Math.h>
#include <openvdb/math/Transform.h>
#include <openvdb/Grid.h>
#include <openvdb/tree/ValueAccessor.h>
#include <cmath>
#include <type_traits>
+ Include dependency graph for Interpolation.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< Order, Staggered >
 Provises a unified interface for sampling, i.e. interpolation. More...
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::PointSampler
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::BoxSampler
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::QuadraticSampler
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::StaggeredPointSampler
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::StaggeredBoxSampler
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::StaggeredQuadraticSampler
 
class  openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< GridOrTreeType, SamplerType >
 Class that provides the interface for continuous sampling of values in a tree. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >
 Specialization of GridSampler for construction from a ValueAccessor type. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< GridOrTreeT, SamplerT >
 This is a simple convenience class that allows for sampling from a source grid into the index space of a target grid. At construction the source and target grids are checked for alignment which potentially renders interpolation unnecessary. Else interpolation is performed according to the templated Sampler type. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::DualGridSampler< tree::ValueAccessor< TreeT >, SamplerT >
 Specialization of DualGridSampler for construction from a ValueAccessor type. More...
 
class  openvdb::OPENVDB_VERSION_NAME::tools::AlphaMask< GridT, MaskT, SamplerT, FloatT >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 0, false >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 1, false >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 2, false >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 0, true >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 1, true >
 
struct  openvdb::OPENVDB_VERSION_NAME::tools::Sampler< 2, true >
 

Namespaces

 openvdb
 
 openvdb::OPENVDB_VERSION_NAME
 
 openvdb::OPENVDB_VERSION_NAME::tools
 
 openvdb::OPENVDB_VERSION_NAME::tools::local_util
 

Functions

Vec3i openvdb::OPENVDB_VERSION_NAME::tools::local_util::floorVec3 (const Vec3R &v)
 
Vec3i openvdb::OPENVDB_VERSION_NAME::tools::local_util::ceilVec3 (const Vec3R &v)
 
Vec3i openvdb::OPENVDB_VERSION_NAME::tools::local_util::roundVec3 (const Vec3R &v)
 

Detailed Description

Sampler classes such as PointSampler and BoxSampler that are intended for use with tools::GridTransformer should operate in voxel space and must adhere to the interface described in the example below:

struct MySampler
{
// Return a short name that can be used to identify this sampler
// in error messages and elsewhere.
const char* name() { return "mysampler"; }
// Return the radius of the sampling kernel in voxels, not including
// the center voxel. This is the number of voxels of padding that
// are added to all sides of a volume as a result of resampling.
int radius() { return 2; }
// Return true if scaling by a factor smaller than 0.5 (along any axis)
// should be handled via a mipmapping-like scheme of successive halvings
// of a grid's resolution, until the remaining scale factor is
// greater than or equal to 1/2. Set this to false only when high-quality
// scaling is not required.
bool mipmap() { return true; }
// Specify if sampling at a location that is collocated with a grid point
// is guaranteed to return the exact value at that grid point.
// For most sampling kernels, this should be false.
bool consistent() { return false; }
// Sample the tree at the given coordinates and return the result in val.
// Return true if the sampled value is active.
template<class TreeT>
bool sample(const TreeT& tree, const Vec3R& coord, typename TreeT::ValueType& val);
};

Definition in file Interpolation.h.