HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
openvdb::OPENVDB_VERSION_NAME::points::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 <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 More...
 
void addPoints (GridConstPtr &points)
 Append a PointDataGrid to the rasterizer (but don't rasterize yet). More...
 
void addPoints (GridPtr &points, bool stream=false)
 Append a PointDataGrid to the rasterizer (but don't rasterize yet). More...
 
void clear ()
 Clear all PointDataGrids in the rasterizer. More...
 
size_t size () const
 Return number of PointDataGrids in the rasterizer. More...
 
size_t memUsage () const
 Return memory usage of the rasterizer. More...
 
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::OPENVDB_VERSION_NAME::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.

Definition at line 163 of file PointRasterizeFrustum.h.

Member Typedef Documentation

template<typename PointDataGridT >
using openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::GridConstPtr = typename PointDataGridT::ConstPtr

Definition at line 167 of file PointRasterizeFrustum.h.

template<typename PointDataGridT >
using openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::GridPtr = typename PointDataGridT::Ptr

Definition at line 166 of file PointRasterizeFrustum.h.

template<typename PointDataGridT >
using openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::GridToRasterize = point_rasterize_internal::GridToRasterize<PointDataGridT>

Definition at line 168 of file PointRasterizeFrustum.h.

Constructor & Destructor Documentation

template<typename PointDataGridT >
openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::FrustumRasterizer ( const FrustumRasterizerSettings settings,
const FrustumRasterizerMask mask = FrustumRasterizerMask(),
util::NullInterrupter interrupt = nullptr 
)
explicit

main constructor

Parameters
settingsthe shared settings for rasterizing, see class for more details
maska spatial mask to use to define the areas of rasterization
interrupta pointer adhering to the util::NullInterrupter interface

Definition at line 1265 of file PointRasterizeFrustumImpl.h.

Member Function Documentation

template<typename PointDataGridT >
void openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::addPoints ( GridConstPtr points)

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

Parameters
pointsthe PointDataGrid

Definition at line 1280 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
void openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::addPoints ( GridPtr points,
bool  stream = false 
)

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

Parameters
pointsthe non-const PointDataGrid
streamif true, will destructively collapse attributes while accessing so as to minimize the memory footprint.

Definition at line 1291 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
void openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::clear ( void  )

Clear all PointDataGrids in the rasterizer.

Definition at line 1301 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
size_t openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::memUsage ( ) const

Return memory usage of the rasterizer.

Definition at line 1315 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
template<typename FilterT >
GridBase::Ptr openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::rasterizeAttribute ( const Name attribute,
RasterMode  mode = RasterMode::ACCUMULATE,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)

Definition at line 1352 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
template<typename GridT , typename AttributeT , typename FilterT >
GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::rasterizeAttribute ( const Name attribute,
RasterMode  mode = RasterMode::ACCUMULATE,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)

Definition at line 1421 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
template<typename FilterT >
FloatGrid::Ptr openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::rasterizeDensity ( const openvdb::Name &  attribute,
RasterMode  mode = RasterMode::MAXIMUM,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)

Definition at line 1340 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
template<typename GridT , typename FilterT >
GridT::Ptr openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::rasterizeMask ( bool  reduceMemory = false,
const FilterT &  filter = FilterT() 
)

Definition at line 1440 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
template<typename FilterT >
FloatGrid::Ptr openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::rasterizeUniformDensity ( RasterMode  mode = RasterMode::MAXIMUM,
bool  reduceMemory = false,
float  scale = 1.0f,
const FilterT &  filter = FilterT() 
)

Definition at line 1327 of file PointRasterizeFrustumImpl.h.

template<typename PointDataGridT >
size_t openvdb::OPENVDB_VERSION_NAME::points::FrustumRasterizer< PointDataGridT >::size ( void  ) const

Return number of PointDataGrids in the rasterizer.

Definition at line 1308 of file PointRasterizeFrustumImpl.h.


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