|
| ParticlesToLevelSet (SdfGridT &grid, InterrupterT *interrupt=nullptr) |
| Constructor using an exiting signed distance, i.e. narrow band level set, grid. More...
|
|
| ~ParticlesToLevelSet () |
| Destructor. More...
|
|
void | finalize (bool prune=false) |
| This methods syncs up the level set and attribute grids and therefore needs to be called before any of these grids are used and after the last call to any of the rasterizer methods. More...
|
|
AttGridType::Ptr | attributeGrid () |
| Return a shared pointer to the grid containing the (optional) attribute. More...
|
|
Real | getVoxelSize () const |
| Return the size of a voxel in world units. More...
|
|
Real | getHalfWidth () const |
| Return the half-width of the narrow band in voxel units. More...
|
|
Real | getRmin () const |
| Return the smallest radius allowed in voxel units. More...
|
|
Real | getRmax () const |
| Return the largest radius allowed in voxel units. More...
|
|
bool | ignoredParticles () const |
| Return true if any particles were ignored due to their size. More...
|
|
size_t | getMinCount () const |
| Return number of small particles that were ignore due to Rmin. More...
|
|
size_t | getMaxCount () const |
| Return number of large particles that were ignore due to Rmax. More...
|
|
void | setRmin (Real Rmin) |
| set the smallest radius allowed in voxel units More...
|
|
void | setRmax (Real Rmax) |
| set the largest radius allowed in voxel units More...
|
|
int | getGrainSize () const |
| Returns the grain-size used for multi-threading. More...
|
|
void | setGrainSize (int grainSize) |
| Set the grain-size used for multi-threading. More...
|
|
template<typename ParticleListT > |
void | rasterizeSpheres (const ParticleListT &pa) |
| Rasterize a sphere per particle derived from their position and radius. All spheres are CSG unioned. More...
|
|
template<typename ParticleListT > |
void | rasterizeSpheres (const ParticleListT &pa, Real radius) |
| Rasterize a sphere per particle derived from their position and constant radius. All spheres are CSG unioned. More...
|
|
template<typename ParticleListT > |
void | rasterizeTrails (const ParticleListT &pa, Real delta=1.0) |
| Rasterize a trail per particle derived from their position, radius and velocity. Each trail is generated as CSG unions of sphere instances with decreasing radius. More...
|
|
Constructor using an exiting signed distance, i.e. narrow band level set, grid.
- Parameters
-
grid | Level set grid in which particles are rasterized |
interrupt | Callback to interrupt a long-running process |
- Note
- The input grid is assumed to be a valid level set and if it already contains voxels (with SDF values) particles are unioned onto the existing level set surface. However, if attribute transfer is enabled, i.e. AttributeT != void, attributes are only generated for voxels that overlap with particles, not the existing voxels in the input grid (for which no attributes exist!).
The width in voxel units of the generated narrow band level set is given by 2*background/dx, where background is the background value stored in the grid, and dx is the voxel size derived from the transform also stored in the grid. Also note that -background corresponds to the constant value inside the generated narrow band level sets. Finally the default NullInterrupter should compile out interruption checks during optimization, thus incurring no run-time overhead.