OpenVDB 11.0.0

Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Friends | List of all members
CachedDeformer< T > Class Template Reference

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

`#include <openvdb/points/impl/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.
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.

## Friends
class | ::TestPointMove

## Detailed Description

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

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

## Member Typedef Documentation

## ◆ LeafIndex

template<typename T >

using LeafIndex = point_move_internal::LeafIndex

## ◆ LeafMapT

template<typename T >

using LeafMapT = std::unordered_map<LeafIndex, Vec3T>

## ◆ LeafVecT

template<typename T >

using LeafVecT = std::vector<Vec3T>

## ◆ Vec3T

template<typename T >

using Vec3T = typename math::Vec3<T>

## Constructor & Destructor Documentation

## ◆ CachedDeformer()

template<typename T >

CachedDeformer | ( | Cache & | cache | ) |
| explicit

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

## Member Function Documentation

## ◆ apply()

template<typename T >
template<typename IndexIterT >

void apply | ( | Vec3d & | position,
|  | const IndexIterT & | iter
| ) |  | const

Retrieve the new position from the cache.

## ◆ evaluate()

template<typename T >
template<typename PointDataGridT , typename DeformerT , typename FilterT >

void 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

  grid | the points to be moved
  deformer | the deformer to apply to the points
  filter | the point filter to use when evaluating the points
  threaded | enable or disable threading (threading is enabled by default)

## ◆ reset()

template<typename T >
template<typename LeafT >

void reset | ( | const LeafT & | leaf,
|  | size_t | idx
| ) |  |

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

Exceptions

  IndexError | if idx is out-of-range of the leafs in the cache

## Friends And Related Symbol Documentation

## ◆ ::TestPointMove

template<typename T >

friend class ::TestPointMove
| friend