iMSTK
Interactive Medical Simulation Toolkit
|
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. More...
#include <imstkTearable.h>
Public Member Functions | |
Tearable (const std::string &name="TearablePbdObjectBehavior") | |
void | init () override |
Initialize the component, called at a later time after all component construction is complete. | |
std::shared_ptr< PbdObject > | getPbdObject () const |
Get the PBD object to be torn. | |
double | getMaxStrain () const |
Get/Set the maximum strain. This measure is defined by (current constraint value / reference value) where the reference value is not zero. If the reference value is zero, the constraint value is used. | |
void | setMaxStrain (const double maxStrain) |
![]() | |
virtual void | update (const UpdateInfo &imstkNotUsed(updateData)) |
virtual void | visualUpdate (const UpdateInfo &imstkNotUsed(updateData)) |
void | initTaskGraphEdges () |
Setup the edges/connections of the TaskGraph. | |
std::shared_ptr< TaskGraph > | getTaskGraph () const |
![]() | |
const std::string & | getName () const |
void | setName (const std::string &name) |
std::weak_ptr< Entity > | getEntity () const |
Get parent entity. | |
void | initialize () |
Initialize the component, called at a later time after all component construction is complete. | |
Protected Member Functions | |
void | handleTearable () |
void | initGraphEdges (std::shared_ptr< TaskNode > source, std::shared_ptr< TaskNode > sink) override |
![]() | |
Behaviour (const std::string &name="Behaviour") | |
Behaviour (const bool useTaskGraph, const std::string &name="Behaviour") | |
virtual void | initGraphEdges (std::shared_ptr< TaskNode > imstkNotUsed(source), std::shared_ptr< TaskNode > imstkNotUsed(sink)) |
Setup the edges/connections of the TaskGraph. More... | |
![]() | |
Component (const std::string &name="Component") | |
Protected Attributes | |
std::shared_ptr< PbdObject > | m_tearableObject |
Object being torn. | |
std::shared_ptr< PbdObjectCellRemoval > | m_cellRemover = nullptr |
Cell remover for removing cells. | |
std::shared_ptr< TaskNode > | m_tearableHandleNode |
double | m_maxStrain = 0.5 |
![]() | |
std::shared_ptr< TaskGraph > | m_taskGraph = nullptr |
![]() | |
std::string | m_name |
std::weak_ptr< Entity > | m_entity |
Parent entity this component exists on. | |
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.
Definition at line 28 of file imstkTearable.h.
|
protected |
< Vertices that are part of the constraint
Definition at line 47 of file imstkTearable.cpp.