OpenVDB 12.0.0
|
A (very) simple multithreaded volume render specifically for scalar density. More...
#include </private/tmp/openvdb-20241101-6943-enag0s/openvdb-12.0.0/openvdb/openvdb/tools/RayTracer.h>
Public Types | |
using | GridType = typename IntersectorT::GridType |
using | RayType = typename IntersectorT::RayType |
using | ValueType = typename GridType::ValueType |
using | AccessorType = typename GridType::ConstAccessor |
using | SamplerType = tools::GridSampler<AccessorType, SamplerT> |
Public Member Functions | |
VolumeRender (const IntersectorT &inter, BaseCamera &camera) | |
Constructor taking an intersector and a base camera. | |
VolumeRender (const VolumeRender &other) | |
Copy constructor which creates a thread-safe clone. | |
void | render (bool threaded=true) const |
Perform the actual (potentially multithreaded) volume rendering. | |
void | setCamera (BaseCamera &camera) |
Set the camera derived from the abstract BaseCamera class. | |
void | setIntersector (const IntersectorT &inter) |
Set the intersector that performs the actual intersection of the rays against the volume. | |
void | setLightDir (Real x, Real y, Real z) |
Set the vector components of a directional light source. | |
void | setLightColor (Real r, Real g, Real b) |
Set the color of the directional light source. | |
void | setPrimaryStep (Real primaryStep) |
Set the integration step-size in voxel units for the primay ray. | |
void | setShadowStep (Real shadowStep) |
Set the integration step-size in voxel units for the primay ray. | |
void | setScattering (Real x, Real y, Real z) |
Set Scattering coefficients. | |
void | setAbsorption (Real x, Real y, Real z) |
Set absorption coefficients. | |
void | setLightGain (Real gain) |
Set parameter that imitates multi-scattering. A value of zero implies no multi-scattering. | |
void | setCutOff (Real cutOff) |
Set the cut-off value for density and transmittance. | |
void | print (std::ostream &os=std::cout, int verboseLevel=1) |
Print parameters, statistics, memory usage and other information. | |
void | operator() (const tbb::blocked_range< size_t > &range) const |
Public method required by tbb::parallel_for. | |
A (very) simple multithreaded volume render specifically for scalar density.
Included primarily as a reference implementation.
using AccessorType = typename GridType::ConstAccessor |
using GridType = typename IntersectorT::GridType |
using RayType = typename IntersectorT::RayType |
using SamplerType = tools::GridSampler<AccessorType, SamplerT> |
using ValueType = typename GridType::ValueType |
|
inline |
Constructor taking an intersector and a base camera.
|
inline |
Copy constructor which creates a thread-safe clone.
|
inline |
Public method required by tbb::parallel_for.
|
inline |
Print parameters, statistics, memory usage and other information.
os | a stream to which to write textual information |
verboseLevel | 1: print parameters only; 2: include grid statistics; 3: include memory usage |
|
inline |
Perform the actual (potentially multithreaded) volume rendering.
|
inline |
Set absorption coefficients.
|
inline |
Set the camera derived from the abstract BaseCamera class.
|
inline |
Set the cut-off value for density and transmittance.
|
inline |
Set the intersector that performs the actual intersection of the rays against the volume.
|
inline |
Set the color of the directional light source.
|
inline |
Set the vector components of a directional light source.
ArithmeticError | if input is a null vector. |
|
inline |
Set parameter that imitates multi-scattering. A value of zero implies no multi-scattering.
|
inline |
Set the integration step-size in voxel units for the primay ray.
|
inline |
Set Scattering coefficients.
|
inline |
Set the integration step-size in voxel units for the primay ray.