Loading...
Searching...
No Matches
LevelSetFracture< GridType, InterruptType > Class Template Reference

Level set fracturing. More...

`#include <openvdb/tools/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.
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.
GridPtrList & | fragments ()
| Return a list of new fragments, not including the residuals from the input grids.
void | clear ()
| Remove all elements from the fragment list.

## Detailed Description

template<class GridType, class InterruptType = util::NullInterrupter>
class openvdb::v10_0::tools::LevelSetFracture< GridType, InterruptType >

Level set fracturing.

## Member Typedef Documentation

## GridPtrList

template<class GridType, class InterruptType = util::NullInterrupter>

using GridPtrList = std::list<typename GridType::Ptr>

## GridPtrListIter

template<class GridType, class InterruptType = util::NullInterrupter>

using GridPtrListIter = typename GridPtrList::iterator

## QuatsList

template<class GridType, class InterruptType = util::NullInterrupter>

using QuatsList = std::vector<math::Quats>

## Vec3sList

template<class GridType, class InterruptType = util::NullInterrupter>

using Vec3sList = std::vector<Vec3s>

## Constructor & Destructor Documentation

## LevelSetFracture()

template<class GridType, class InterruptType>

LevelSetFracture | ( | InterruptType * | interrupter = nullptr | ) |

explicit

Default constructor.

Parameters

  interrupter | optional interrupter object

## Member Function Documentation

## clear()

template<class GridType, class InterruptType = util::NullInterrupter>

void clear | ( |  | ) |

inline

Remove all elements from the fragment list.

## fracture()

template<class GridType, class InterruptType>

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.

If desired, the process can be applied iteratively, so that fragments created with one cutter are subdivided by other cutters.

Note
  The incoming grids and the cutter are required to have matching transforms and narrow band widths!

Parameters

  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

## fragments()

template<class GridType, class InterruptType = util::NullInterrupter>

GridPtrList & fragments | ( |  | ) |

inline

Return a list of new fragments, not including the residuals from the input grids.