7 #include "imstkComponent.h" 16 class PbdObjectCellRemoval;
31 Tearable(
const std::string& name =
"TearablePbdObjectBehavior");
47 void setMaxStrain(
const double maxStrain) { m_maxStrain = maxStrain; }
56 void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink)
override;
61 std::shared_ptr<TaskNode> m_tearableHandleNode;
65 double m_maxStrain = 0.5;
void init() override
Initialize the component, called at a later time after all component construction is complete...
double getMaxStrain() const
Get/Set the maximum strain. This measure is defined by (current constraint value / reference value) w...
std::shared_ptr< PbdObjectCellRemoval > m_cellRemover
Cell remover for removing cells.
A Behaviour represents a single component system A template is used here for UpdateInfo to keep the C...
Defines the behaviour to allow a mesh to seperate based on strain in a given cell. This class approximates strain using the constraint value in from the PBD solver. This is well defined for line meshes, but the behavior may not be what is expected for surface or tet meshes.
std::shared_ptr< PbdObject > getPbdObject() const
Get the PBD object to be torn.
std::shared_ptr< PbdObject > m_tearableObject
Object being torn.