OpenVDB: FrustumRasterizer< PointDataGridT > Class Template Reference

OpenVDB 12.1.1

Loading...
Searching...
No Matches
FrustumRasterizer< PointDataGridT > Class Template Reference

Efficient rasterization of one or more VDB Points grids into a linear or frustum volume with the option to bake in camera or geometry motion blur. More...

`#include <openvdb/points/PointRasterizeFrustum.h>`

## Public Types
using | GridPtr = typename PointDataGridT::Ptr
using | GridConstPtr = typename PointDataGridT::ConstPtr
using | GridToRasterize = point_rasterize_internal::GridToRasterize<PointDataGridT>

## Public Member Functions
| FrustumRasterizer (const FrustumRasterizerSettings &settings, const FrustumRasterizerMask &mask=FrustumRasterizerMask(), util::NullInterrupter *interrupt=nullptr)
| main constructor
void | addPoints (GridConstPtr &points)
| Append a PointDataGrid to the rasterizer (but don't rasterize yet).
void | addPoints (GridPtr &points, bool stream=false)
| Append a PointDataGrid to the rasterizer (but don't rasterize yet).
void | clear ()
| Clear all PointDataGrids in the rasterizer.
size_t | size () const
| Return number of PointDataGrids in the rasterizer.
size_t | memUsage () const
| Return memory usage of the rasterizer.
template<typename FilterT = points::NullFilter>
FloatGrid::Ptr | rasterizeUniformDensity (RasterMode mode=RasterMode::MAXIMUM, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
template<typename FilterT = points::NullFilter>
FloatGrid::Ptr | rasterizeDensity (const openvdb::Name &attribute, RasterMode mode=RasterMode::MAXIMUM, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
template<typename FilterT = points::NullFilter>
GridBase::Ptr | rasterizeAttribute (const Name &attribute, RasterMode mode=RasterMode::ACCUMULATE, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
template<typename GridT, typename AttributeT, typename FilterT = points::NullFilter>
GridT::Ptr | rasterizeAttribute (const Name &attribute, RasterMode mode=RasterMode::ACCUMULATE, bool reduceMemory=false, float scale=1.0f, const FilterT &filter=FilterT())
template<typename GridT, typename FilterT = points::NullFilter>
GridT::Ptr | rasterizeMask (bool reduceMemory=false, const FilterT &filter=FilterT())

## Detailed Description

template<typename PointDataGridT>
class openvdb::v12_1::points::FrustumRasterizer< PointDataGridT >

Efficient rasterization of one or more VDB Points grids into a linear or frustum volume with the option to bake in camera or geometry motion blur.

The camera transform can be provided using a RasterCamera object to offer linear camera motion blur and geometry motion blur is computed from reading a velocity attribute on the points. Sub-sampled camera motion blur is planned.

Note
  For maximum memory efficiency, the data can optionally be streamed from disk where the input VDB point grids are collapsed as they are read.
  The total contribution for each point is spread across all the voxels being rasterized into and weighted by the total volume represented by each voxel. In an example use case where a point is moving away from a camera that is used to generate a frustum volume being rasterized into, each successive voxel is larger in size.

## Member Typedef Documentation

## ◆ GridConstPtr

template<typename PointDataGridT>

using GridConstPtr = typename PointDataGridT::ConstPtr

## ◆ GridPtr

template<typename PointDataGridT>

using GridPtr = typename PointDataGridT::Ptr

## ◆ GridToRasterize

template<typename PointDataGridT>

using GridToRasterize = point_rasterize_internal::GridToRasterize<PointDataGridT>

## Constructor & Destructor Documentation

## ◆ FrustumRasterizer()

template<typename PointDataGridT>

FrustumRasterizer | ( | const FrustumRasterizerSettings & | settings,
|  | const FrustumRasterizerMask & | mask = FrustumRasterizerMask(),
|  | util::NullInterrupter * | interrupt = nullptr )
| explicit

main constructor

Parameters

  settings | the shared settings for rasterizing, see class for more details
  mask | a spatial mask to use to define the areas of rasterization
  interrupt | a pointer adhering to the util::NullInterrupter interface

## Member Function Documentation

## ◆ addPoints() [1/2]

template<typename PointDataGridT>

void addPoints | ( | GridConstPtr & | points | ) |

Append a PointDataGrid to the rasterizer (but don't rasterize yet).

Parameters

  points | the PointDataGrid

## ◆ addPoints() [2/2]

template<typename PointDataGridT>

void addPoints | ( | GridPtr & | points,
|  | bool | stream = false )

Append a PointDataGrid to the rasterizer (but don't rasterize yet).

Parameters

  points | the non-const PointDataGrid
  stream | if true, will destructively collapse attributes while accessing so as to minimize the memory footprint.

## ◆ clear()

template<typename PointDataGridT>

void clear | ( |  | ) |

Clear all PointDataGrids in the rasterizer.

## ◆ memUsage()

template<typename PointDataGridT>

size_t memUsage | ( |  | ) | const

Return memory usage of the rasterizer.

## ◆ rasterizeAttribute() [1/2]

template<typename PointDataGridT>
template<typename GridT, typename AttributeT, typename FilterT>

GridT::Ptr rasterizeAttribute | ( | const Name & | attribute,
|  | RasterMode | mode = RasterMode::ACCUMULATE,
|  | bool | reduceMemory = false,
|  | float | scale = 1.0f,
|  | const FilterT & | filter = FilterT() )

## ◆ rasterizeAttribute() [2/2]

template<typename PointDataGridT>
template<typename FilterT>

GridBase::Ptr rasterizeAttribute | ( | const Name & | attribute,
|  | RasterMode | mode = RasterMode::ACCUMULATE,
|  | bool | reduceMemory = false,
|  | float | scale = 1.0f,
|  | const FilterT & | filter = FilterT() )

## ◆ rasterizeDensity()

template<typename PointDataGridT>
template<typename FilterT>

FloatGrid::Ptr rasterizeDensity | ( | const openvdb::Name & | attribute,
|  | RasterMode | mode = RasterMode::MAXIMUM,
|  | bool | reduceMemory = false,
|  | float | scale = 1.0f,
|  | const FilterT & | filter = FilterT() )

## ◆ rasterizeMask()

template<typename PointDataGridT>
template<typename GridT, typename FilterT>

GridT::Ptr rasterizeMask | ( | bool | reduceMemory = false,
|  | const FilterT & | filter = FilterT() )

## ◆ rasterizeUniformDensity()

template<typename PointDataGridT>
template<typename FilterT>

FloatGrid::Ptr rasterizeUniformDensity | ( | RasterMode | mode = RasterMode::MAXIMUM,
|  | bool | reduceMemory = false,
|  | float | scale = 1.0f,
|  | const FilterT & | filter = FilterT() )

## ◆ size()

template<typename PointDataGridT>

size_t size | ( |  | ) | const

Return number of PointDataGrids in the rasterizer.