OpenVDB 14.0.0
Loading...
Searching...
No Matches
SampleFromVoxels.h File Reference

NearestNeighborSampler, TrilinearSampler, TriquadraticSampler and TricubicSampler. More...

#include <cmath>
#include <nanovdb/math/Math.h>

Go to the source code of this file.

Classes

class  SampleFromVoxels< TreeOrAccT, 0, true >
 Nearest neighbor, i.e. zero order, interpolator with caching. More...
class  SampleFromVoxels< TreeOrAccT, 0, false >
 Nearest neighbor, i.e. zero order, interpolator without caching. More...
struct  MakeVoid<... >
 Scalar component type of a scalar or vector value type, e.g. float for both float and Vec3<float> More...
struct  ScalarOf< T, typename >
struct  ScalarOf< T, typename MakeVoid< typename T::ValueType >::type >
class  TrilinearSampler< TreeOrAccT >
 Tri-linear sampler, i.e. first order, interpolator. More...
class  SampleFromVoxels< TreeOrAccT, 1, false >
 Template specialization that does not use caching of stencil points. More...
class  SampleFromVoxels< TreeOrAccT, 1, true >
 Template specialization with caching of stencil values. More...
class  TriquadraticSampler< TreeOrAccT >
 Tri-quadratic sampler, i.e. second order, interpolator. More...
class  SampleFromVoxels< TreeOrAccT, 2, false >
 Template specialization that does not use caching of stencil points. More...
class  SampleFromVoxels< TreeOrAccT, 2, true >
 Template specialization with caching of stencil values. More...
class  TricubicSampler< TreeOrAccT >
 Tri-cubic sampler, i.e. third order, interpolator. More...
class  SampleFromVoxels< TreeOrAccT, 3, true >
class  SampleFromVoxels< TreeOrAccT, 3, false >

Namespaces

namespace  nanovdb
 Defines a simple memory pool used to call cub functions that use dynamic temporary storage.
namespace  nanovdb::math
namespace  nanovdb::math::detail

Macros

#define __hostdev__

Functions

template<int Order, typename TreeOrAccT, bool UseCache = true>
SampleFromVoxels< TreeOrAccT, Order, UseCache > createSampler (const TreeOrAccT &acc)
 Factory free-function for a sampler of specific polynomial orders.
template<typename CoordT, typename RealT, template< typename > class Vec3T>
CoordT Floor (Vec3T< RealT > &xyz)
 Utility function that returns the Coord of the round-down of xyz and redefined (x, y, z) as the fractional part, ie xyz-in = return-value + xyz-out.
template<typename CoordT, template< typename > class Vec3T>
CoordT Floor (Vec3T< float > &xyz)
 Template specialization of Floor for Vec3<float>
template<typename CoordT, template< typename > class Vec3T>
CoordT Floor (Vec3T< double > &xyz)
 Template specialization of Floor for Vec3<float>
template<typename RealT, typename T>
constexpr auto toReal (const T &v)
 Explicitly convert an integral v to RealT, i.e. the implicit promotion in mixed integer/floating-point arithmetic. All other types are returned unchanged.
template<typename T, typename S>
T scale (const T &v, S s)
 Preserve NanoVDB vectors' component-precision scalar multiplication. For other types, multiply before converting the result back to T.

Detailed Description

NearestNeighborSampler, TrilinearSampler, TriquadraticSampler and TricubicSampler.

Note
These interpolators employ internal caching for better performance when used repeatedly in the same voxel location, so try to reuse an instance of these classes more than once.
Warning
While all the interpolators defined below work with both scalars and vectors values (e.g. float and Vec3<float>) TrilinarSampler::zeroCrossing and Trilinear::gradient will only compile with floating point value types.
Author
Ken Museth

Macro Definition Documentation

◆ __hostdev__

#define __hostdev__