iMSTK
Interactive Medical Simulation Toolkit
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imstk::Tearable Class Reference

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>

Inheritance diagram for imstk::Tearable:
Inheritance graph
[legend]
Collaboration diagram for imstk::Tearable:
Collaboration graph
[legend]

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< PbdObjectgetPbdObject () 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)
 
- Public Member Functions inherited from imstk::Behaviour< UpdateInfo >
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< TaskGraphgetTaskGraph () const
 
- Public Member Functions inherited from imstk::Component
const std::string & getName () const
 
void setName (const std::string &name)
 
std::weak_ptr< EntitygetEntity () 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
 
- Protected Member Functions inherited from imstk::Behaviour< UpdateInfo >
 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...
 
- Protected Member Functions inherited from imstk::Component
 Component (const std::string &name="Component")
 

Protected Attributes

std::shared_ptr< PbdObjectm_tearableObject
 Object being torn.
 
std::shared_ptr< PbdObjectCellRemovalm_cellRemover = nullptr
 Cell remover for removing cells.
 
std::shared_ptr< TaskNodem_tearableHandleNode
 
double m_maxStrain = 0.5
 
- Protected Attributes inherited from imstk::Behaviour< UpdateInfo >
std::shared_ptr< TaskGraphm_taskGraph = nullptr
 
- Protected Attributes inherited from imstk::Component
std::string m_name
 
std::weak_ptr< Entitym_entity
 Parent entity this component exists on.
 

Detailed Description

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.

Member Function Documentation

◆ handleTearable()

void imstk::Tearable::handleTearable ( )
protected

< Vertices that are part of the constraint

Definition at line 47 of file imstkTearable.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: