HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order > Class Template Reference

#include <VelocityFields.h>

Public Types

typedef GridT::ConstAccessor AccessorType
 
typedef GridT::ValueType ValueType
 

Public Member Functions

 VelocitySampler (const GridT &grid)
 Constructor from a grid. More...
 
 VelocitySampler (const VelocitySampler &other)
 Copy-constructor. More...
 
template<typename LocationType >
bool sample (const LocationType &world, ValueType &result) const
 Samples the velocity at world position onto result. Supports both staggered (i.e. MAC) and collocated velocity grids. More...
 
template<typename LocationType >
ValueType sample (const LocationType &world) const
 Samples the velocity at world position onto result. Supports both staggered (i.e. MAC) and co-located velocity grids. More...
 

Detailed Description

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
class openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >

Class to hold a Vec3 field interpreted as a velocity field. Primarily exists to provide a method(s) that integrate a passive point forward in the velocity field for a single time-step (dt)

Definition at line 179 of file VelocityFields.h.

Member Typedef Documentation

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
typedef GridT::ConstAccessor openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::AccessorType

Definition at line 182 of file VelocityFields.h.

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
typedef GridT::ValueType openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::ValueType

Definition at line 183 of file VelocityFields.h.

Constructor & Destructor Documentation

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::VelocitySampler ( const GridT &  grid)
inline

Constructor from a grid.

Definition at line 186 of file VelocityFields.h.

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::VelocitySampler ( const VelocitySampler< GridT, Staggered, Order > &  other)
inline

Copy-constructor.

Definition at line 192 of file VelocityFields.h.

Member Function Documentation

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
template<typename LocationType >
bool openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::sample ( const LocationType &  world,
ValueType result 
) const
inline

Samples the velocity at world position onto result. Supports both staggered (i.e. MAC) and collocated velocity grids.

Returns
true if any one of the sampled values is active.
Warning
Not threadsafe since it uses a ValueAccessor! So use one instance per thread (which is fine since its lightweight).

Definition at line 205 of file VelocityFields.h.

template<typename GridT = Vec3fGrid, bool Staggered = false, size_t Order = 1>
template<typename LocationType >
ValueType openvdb::OPENVDB_VERSION_NAME::tools::VelocitySampler< GridT, Staggered, Order >::sample ( const LocationType &  world) const
inline

Samples the velocity at world position onto result. Supports both staggered (i.e. MAC) and co-located velocity grids.

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

Definition at line 218 of file VelocityFields.h.


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