OpenVDB  8.1.1
Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
TileSampler< Sampler, TreeT > Class Template Reference

A TileSampler wraps a grid sampler of another type (BoxSampler, QuadraticSampler, etc.), and for samples that fall within a given tile of the grid, it returns a cached tile value instead of accessing the grid. More...

#include <GridTransformer.h>

Inherits Sampler< Order, Staggered >.

Public Types

using ValueT = typename TreeT::ValueType
 

Public Member Functions

 TileSampler (const CoordBBox &b, const ValueT &tileVal, bool on)
 
bool sample (const TreeT &inTree, const Vec3R &inCoord, ValueT &result) const
 

Static Public Member Functions

static const char * name ()
 
static int radius ()
 
static bool mipmap ()
 
static bool consistent ()
 
static bool staggered ()
 
static size_t order ()
 
template<class TreeT >
static bool sample (const TreeT &inTree, const Vec3R &inCoord, typename TreeT::ValueType &result)
 Sample inTree at the floating-point index coordinate inCoord and store the result in result. More...
 
template<class TreeT >
static TreeT::ValueType sample (const TreeT &inTree, const Vec3R &inCoord)
 Sample inTree at the floating-point index coordinate inCoord. More...
 

Protected Attributes

BBoxd mBBox
 
ValueT mVal
 
bool mActive
 
bool mEmpty
 

Detailed Description

template<typename Sampler, typename TreeT>
class openvdb::v8_1::tools::internal::TileSampler< Sampler, TreeT >

A TileSampler wraps a grid sampler of another type (BoxSampler, QuadraticSampler, etc.), and for samples that fall within a given tile of the grid, it returns a cached tile value instead of accessing the grid.

Member Typedef Documentation

using ValueT = typename TreeT::ValueType

Constructor & Destructor Documentation

TileSampler ( const CoordBBox &  b,
const ValueT tileVal,
bool  on 
)
inline
Parameters
bthe index-space bounding box of a particular grid tile
tileValthe tile's value
onthe tile's active state

Member Function Documentation

static bool consistent ( )
staticinherited
static bool mipmap ( )
staticinherited
static const char* name ( )
staticinherited
static size_t order ( )
staticinherited
static int radius ( )
staticinherited
static bool sample ( const TreeT &  inTree,
const Vec3R inCoord,
typename TreeT::ValueType &  result 
)
staticinherited

Sample inTree at the floating-point index coordinate inCoord and store the result in result.

Returns
true if the sampled value is active.
static TreeT::ValueType sample ( const TreeT &  inTree,
const Vec3R inCoord 
)
staticinherited

Sample inTree at the floating-point index coordinate inCoord.

Returns
the reconstructed value
bool sample ( const TreeT &  inTree,
const Vec3R inCoord,
ValueT result 
) const
inline
static bool staggered ( )
staticinherited

Member Data Documentation

bool mActive
protected
BBoxd mBBox
protected
bool mEmpty
protected
ValueT mVal
protected

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