OpenVDB
9.0.1
|
Class that provides the interface for continuous sampling of values in a tree. More...
#include <openvdb/tools/Interpolation.h>
Public Types | |
using | Ptr = SharedPtr< GridSampler > |
using | ValueType = typename GridOrTreeType::ValueType |
using | GridType = typename TreeAdapter< GridOrTreeType >::GridType |
using | TreeType = typename TreeAdapter< GridOrTreeType >::TreeType |
using | AccessorType = typename TreeAdapter< GridOrTreeType >::AccessorType |
Public Member Functions | |
GridSampler (const GridType &grid) | |
GridSampler (const TreeType &tree, const math::Transform &transform) | |
const math::Transform & | transform () const |
template<typename RealType > | |
ValueType | sampleVoxel (const RealType &x, const RealType &y, const RealType &z) const |
Sample a point in index space in the grid. More... | |
ValueType | sampleVoxel (typename Coord::ValueType i, typename Coord::ValueType j, typename Coord::ValueType k) const |
Sample value in integer index space. More... | |
ValueType | isSample (const Coord &ijk) const |
Sample value in integer index space. More... | |
ValueType | isSample (const Vec3d &ispoint) const |
Sample in fractional index space. More... | |
ValueType | wsSample (const Vec3d &wspoint) const |
Sample in world space. More... | |
Class that provides the interface for continuous sampling of values in a tree.
Since trees support only discrete voxel sampling, TreeSampler must be used to sample arbitrary continuous points in (world or index) space.
using AccessorType = typename TreeAdapter<GridOrTreeType>::AccessorType |
using GridType = typename TreeAdapter<GridOrTreeType>::GridType |
using Ptr = SharedPtr<GridSampler> |
using TreeType = typename TreeAdapter<GridOrTreeType>::TreeType |
using ValueType = typename GridOrTreeType::ValueType |
|
inlineexplicit |
grid | a grid to be sampled |
|
inline |
tree | a tree to be sampled, or a ValueAccessor for the tree |
transform | is used when sampling world space locations. |
|
inline |
Sample value in integer index space.
ijk | the location in index space |
|
inline |
Sample in fractional index space.
ispoint | the location in index space |
|
inline |
Sample a point in index space in the grid.
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 |
|
inline |
Sample value in integer index space.
i | Integer x-coordinate in index space |
j | Integer y-coordinate in index space |
k | Integer x-coordinate in index space |
|
inline |
|
inline |
Sample in world space.
wspoint | the location in world space |