HDK
|
Level set fracturing. More...
#include <LevelSetFracture.h>
Public Types | |
using | Vec3sList = std::vector< Vec3s > |
using | QuatsList = std::vector< math::Quats > |
using | GridPtrList = std::list< typename GridType::Ptr > |
using | GridPtrListIter = typename GridPtrList::iterator |
Public Member Functions | |
LevelSetFracture (InterruptType *interrupter=nullptr) | |
Default constructor. More... | |
void | fracture (GridPtrList &grids, const GridType &cutter, bool segment=false, const Vec3sList *points=nullptr, const QuatsList *rotations=nullptr, bool cutterOverlap=true) |
Divide volumes represented by level set grids into multiple, disjoint pieces by intersecting them with one or more "cutter" volumes, also represented by level sets. More... | |
GridPtrList & | fragments () |
Return a list of new fragments, not including the residuals from the input grids. More... | |
void | clear () |
Remove all elements from the fragment list. More... | |
Level set fracturing.
Definition at line 37 of file LevelSetFracture.h.
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetFracture< GridType, InterruptType >::GridPtrList = std::list<typename GridType::Ptr> |
Definition at line 42 of file LevelSetFracture.h.
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetFracture< GridType, InterruptType >::GridPtrListIter = typename GridPtrList::iterator |
Definition at line 43 of file LevelSetFracture.h.
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetFracture< GridType, InterruptType >::QuatsList = std::vector<math::Quats> |
Definition at line 41 of file LevelSetFracture.h.
using openvdb::OPENVDB_VERSION_NAME::tools::LevelSetFracture< GridType, InterruptType >::Vec3sList = std::vector<Vec3s> |
Definition at line 40 of file LevelSetFracture.h.
|
explicit |
Default constructor.
interrupter | optional interrupter object |
Definition at line 153 of file LevelSetFracture.h.
|
inline |
Remove all elements from the fragment list.
Definition at line 77 of file LevelSetFracture.h.
void openvdb::OPENVDB_VERSION_NAME::tools::LevelSetFracture< GridType, InterruptType >::fracture | ( | GridPtrList & | grids, |
const GridType & | cutter, | ||
bool | segment = false , |
||
const Vec3sList * | points = nullptr , |
||
const QuatsList * | rotations = nullptr , |
||
bool | cutterOverlap = true |
||
) |
Divide volumes represented by level set grids into multiple, disjoint pieces by intersecting them with one or more "cutter" volumes, also represented by level sets.
If desired, the process can be applied iteratively, so that fragments created with one cutter are subdivided by other cutters.
grids | list of grids to fracture. The residuals of the fractured grids will remain in this list |
cutter | a level set grid to use as the cutter object |
segment | toggle to split disjoint fragments into their own grids |
points | optional list of world space points at which to instance the cutter object (if null, use the cutter's current position only) |
rotations | optional list of custom rotations for each cutter instance |
cutterOverlap | toggle to allow consecutive cutter instances to fracture previously generated fragments |
Definition at line 162 of file LevelSetFracture.h.
|
inline |
Return a list of new fragments, not including the residuals from the input grids.
Definition at line 74 of file LevelSetFracture.h.