OpenVDB  0.104.0
Classes | Functions
openvdb::v0_104_0::tools::local Namespace Reference

This class rasterizes particles (with position, radius and velocity) into a narrow-band level set. More...

Classes

struct  DualTrait
 
class  Dual
 
struct  DualTrait< Dual< T > >
 

Functions

template<typename RealT >
std::ostream & operator<< (std::ostream &ostr, const Dual< RealT > &rhs)
 
template<typename RealT >
Dual< RealT > Abs (const Dual< RealT > &x)
 

Detailed Description

This class rasterizes particles (with position, radius and velocity) into a narrow-band level set.

Note
This fast particle to level set converter is always intended to be combined with some kind of surface post processing, i.e. tools::Filter. Without such post processing the generated surface is typically too noisy and blooby. However it serves as a great and fast starting point for subsequent level set surface processing and convolution. In the near future we will add support for anisotropic particle kernels.

The ParticleListT template argument below refers to any class with the following interface (see unittest/TestParticlesToLevelSet.cc and SOP_DW_OpenVDBParticleVoxelizer for practical examples):

class ParticleList {
...
public:
openvdb::Index size() const;// number of particles in list
openvdb::Vec3R pos(int n) const;// world space position of n'th particle
openvdb::Vec3R vel(int n) const;// world space velocity of n'th particle
openvdb::Real radius(int n) const;// world space radius of n'th particle
};
Note
All methods are assumed to be thread-safe. Also note all access methods return by value since this allows for especailly the radius and velocities to be scaled (i.e. modified) relative to the internal representations (see unittest/TestParticlesToLevelSet.cc for an example).

The InterruptT template argument below refers to any class with the following interface:

class Interrupter {
...
public:
void start(const char* name = NULL)// called when computations begin
void end() // called when computations end
bool wasInterrupted(int percent=-1)// return true to break computation
};
Note
If no template argument is provided for this InterruptT the util::NullInterrupter is used which implies that all interrupter calls are no-ops (i.e. incurs no computational overhead).

Function Documentation

Dual<RealT> openvdb::v0_104_0::tools::local::Abs ( const Dual< RealT > &  x)
inline
std::ostream& openvdb::v0_104_0::tools::local::operator<< ( std::ostream &  ostr,
const Dual< RealT > &  rhs 
)
inline