OpenVDB  2.3.0
Public Types | Public Member Functions | List of all members
DiscreteField< VelGridT, Interpolator > Class Template Reference

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

#include <LevelSetAdvect.h>

Public Types

typedef VelGridT::ValueType VectorType
 
typedef VectorType::ValueType ScalarType
 

Public Member Functions

 DiscreteField (const VelGridT &vel)
 
const math::Transformtransform () const
 
VectorType operator() (const Vec3d &xyz, ScalarType) const
 
VectorType operator() (const Coord &ijk, ScalarType) const
 

Detailed Description

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

Thin wrapper class for a velocity grid.

Below are two simple wrapper classes for advection velocity fields DiscreteField wraps a velocity grid and EnrightField is mostly intended for debugging (it's an analytical divergence free and periodic field). They both share the same API required by the LevelSetAdvection class defined below. Thus, any class with this API should work with LevelSetAdvection. Note the Field wrapper classes below always assume the velocity is represented in the world-frame of reference. For DiscreteField this implies the input grid must contain velocities in world coordinates.

Note
Consider replacing BoxSampler with StaggeredBoxSampler

Member Typedef Documentation

typedef VectorType::ValueType ScalarType
typedef VelGridT::ValueType VectorType

Constructor & Destructor Documentation

DiscreteField ( const VelGridT &  vel)
inline

Member Function Documentation

VectorType operator() ( const Vec3d &  xyz,
ScalarType   
) const
inline
Returns
the interpolated velocity at the world space position xyz
VectorType operator() ( const Coord &  ijk,
ScalarType   
) const
inline
Returns
the velocity at the coordinate space position ijk
const math::Transform& transform ( ) const
inline
Returns
const reference to the transfrom 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.

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