HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T > Class Template Reference

A Deformer that caches the resulting positions from evaluating another Deformer. More...

#include <PointMoveImpl.h>

Classes

struct  Cache
 

Public Types

using LeafIndex = point_move_internal::LeafIndex
 
using Vec3T = typename math::Vec3< T >
 
using LeafVecT = std::vector< Vec3T >
 
using LeafMapT = std::unordered_map< LeafIndex, Vec3T >
 

Public Member Functions

 CachedDeformer (Cache &cache)
 Cache is expected to be persistent for the lifetime of the CachedDeformer. More...
 
template<typename PointDataGridT , typename DeformerT , typename FilterT >
void evaluate (PointDataGridT &grid, DeformerT &deformer, const FilterT &filter, bool threaded=true)
 
template<typename LeafT >
void reset (const LeafT &leaf, size_t idx)
 
template<typename IndexIterT >
void apply (Vec3d &position, const IndexIterT &iter) const
 Retrieve the new position from the cache. More...
 

Friends

class ::TestPointMove
 

Detailed Description

template<typename T>
class openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >

A Deformer that caches the resulting positions from evaluating another Deformer.

Definition at line 25 of file PointMoveImpl.h.

Member Typedef Documentation

template<typename T >
using openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::LeafMapT = std::unordered_map<LeafIndex, Vec3T>

Definition at line 31 of file PointMoveImpl.h.

template<typename T >
using openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::LeafVecT = std::vector<Vec3T>

Definition at line 30 of file PointMoveImpl.h.

template<typename T >
using openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::Vec3T = typename math::Vec3<T>

Definition at line 29 of file PointMoveImpl.h.

Constructor & Destructor Documentation

template<typename T >
openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::CachedDeformer ( Cache cache)
explicit

Cache is expected to be persistent for the lifetime of the CachedDeformer.

Definition at line 633 of file PointMoveImpl.h.

Member Function Documentation

template<typename T >
template<typename IndexIterT >
void openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::apply ( Vec3d &  position,
const IndexIterT &  iter 
) const

Retrieve the new position from the cache.

Definition at line 743 of file PointMoveImpl.h.

template<typename T >
template<typename PointDataGridT , typename DeformerT , typename FilterT >
void openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::evaluate ( PointDataGridT &  grid,
DeformerT &  deformer,
const FilterT &  filter,
bool  threaded = true 
)

Caches the result of evaluating the supplied point grid using the deformer and filter

Parameters
gridthe points to be moved
deformerthe deformer to apply to the points
filterthe point filter to use when evaluating the points
threadedenable or disable threading (threading is enabled by default)

Definition at line 639 of file PointMoveImpl.h.

template<typename T >
template<typename LeafT >
void openvdb::OPENVDB_VERSION_NAME::points::CachedDeformer< T >::reset ( const LeafT &  leaf,
size_t  idx 
)

Stores pointers to the vector or map and optionally expands the map into a vector

Exceptions
IndexErrorif idx is out-of-range of the leafs in the cache

Definition at line 720 of file PointMoveImpl.h.

Friends And Related Function Documentation

template<typename T >
friend class ::TestPointMove
friend

Definition at line 75 of file PointMoveImpl.h.


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