Specialization of GridSampler for construction from a ValueAccessor type.
More...
#include <Interpolation.h>
template<typename TreeT, typename SamplerType>
class openvdb::v5_2::tools::GridSampler< tree::ValueAccessor< TreeT >, SamplerType >
Specialization of GridSampler for construction from a ValueAccessor type.
- Note
- This version should normally be favored over the one above that takes a Grid or Tree. The reason is this version uses a ValueAccessor that performs fast (cached) access where the tree-based flavor performs slower (uncached) access.
- Warning
- Since this version stores a pointer to an (externally allocated) value accessor it is not threadsafe. Hence each thread should have its own instance of a GridSampler constructed from a local ValueAccessor. Alternatively the Grid/Tree-based GridSampler is threadsafe, but also slower.
◆ AccessorType
◆ GridType
◆ Ptr
◆ TreeType
◆ ValueType
◆ GridSampler()
- Parameters
-
acc | a ValueAccessor to be sampled |
transform | is used when sampling world space locations. |
◆ isSample() [1/2]
Sample value in integer index space.
- Parameters
-
ijk | the location in index space |
◆ isSample() [2/2]
ValueType isSample |
( |
const Vec3d & |
ispoint | ) |
const |
|
inline |
Sample in fractional index space.
- Parameters
-
ispoint | the location in index space |
◆ sampleVoxel() [1/2]
ValueType sampleVoxel |
( |
const RealType & |
x, |
|
|
const RealType & |
y, |
|
|
const RealType & |
z |
|
) |
| const |
|
inline |
Sample a point in index space in the grid.
- Parameters
-
x | Fractional x-coordinate of point in index-coordinates of grid |
y | Fractional y-coordinate of point in index-coordinates of grid |
z | Fractional z-coordinate of point in index-coordinates of grid |
◆ sampleVoxel() [2/2]
Sample value in integer index space.
- Parameters
-
i | Integer x-coordinate in index space |
j | Integer y-coordinate in index space |
k | Integer x-coordinate in index space |
◆ transform()
◆ wsSample()
ValueType wsSample |
( |
const Vec3d & |
wspoint | ) |
const |
|
inline |
Sample in world space.
- Parameters
-
wspoint | the location in world space |
The documentation for this class was generated from the following file: