OpenVDB 13.0.0

Loading...
Searching...
No Matches
DiscreteField< VelGridT, Interpolator > Class Template Reference

Thin wrapper class for a velocity grid. More...

`#include <openvdb/tools/VelocityFields.h>`

## Public Types
typedef VelGridT::ValueType | VectorType
typedef VectorType::ValueType | ValueType

## Public Member Functions
| DiscreteField (const VelGridT &vel)
| DiscreteField (const DiscreteField &other)
| Copy constructor.
const math::Transform & | transform () const
VectorType | operator() (const Vec3d &xyz, ValueType) const
VectorType | operator() (const Coord &ijk, ValueType) const

## Detailed Description

template<typename VelGridT, typename Interpolator = BoxSampler>
class openvdb::v13_0::tools::DiscreteField< VelGridT, Interpolator >

Thin wrapper class for a velocity grid.

Note
  Consider replacing BoxSampler with StaggeredBoxSampler

## Member Typedef Documentation

## ◆ ValueType

template<typename VelGridT, typename Interpolator = BoxSampler>

typedef VectorType::ValueType ValueType

## ◆ VectorType

template<typename VelGridT, typename Interpolator = BoxSampler>

typedef VelGridT::ValueType VectorType

## Constructor & Destructor Documentation

## ◆ DiscreteField() [1/2]

template<typename VelGridT, typename Interpolator = BoxSampler>

DiscreteField | ( | const VelGridT & | vel | ) |
| inline

## ◆ DiscreteField() [2/2]

template<typename VelGridT, typename Interpolator = BoxSampler>

DiscreteField | ( | const DiscreteField< VelGridT, Interpolator > & | other | ) |
| inline

Copy constructor.

## Member Function Documentation

## ◆ operator()() [1/2]

template<typename VelGridT, typename Interpolator = BoxSampler>

VectorType operator() | ( | const Coord & | ijk,
|  | ValueType | ) const
| inline

Returns
  the velocity at the coordinate space position ijk

Warning
  Not threadsafe since it uses a ValueAccessor! So use one instance per thread (which is fine since its lightweight).

## ◆ operator()() [2/2]

template<typename VelGridT, typename Interpolator = BoxSampler>

VectorType operator() | ( | const Vec3d & | xyz,
|  | ValueType | ) const
| inline

Returns
  the interpolated velocity at the world space position xyz

Warning
  Not threadsafe since it uses a ValueAccessor! So use one instance per thread (which is fine since its lightweight).

## ◆ transform()

template<typename VelGridT, typename Interpolator = BoxSampler>

const math::Transform & transform | ( |  | ) | const
| inline

Returns
  const reference to the transform between world and index space

Note
  Use this method to determine if a client grid is aligned with the coordinate space of the velocity grid.