#include <TopologicalChangeManager.h>
a class to manage the handling of topological changes which have been requested from the Collision Model More...
a class to manage the handling of topological changes which have been requested from the Collision Model
Public Member Functions | |
TopologicalChangeManager () | |
~TopologicalChangeManager () | |
Index | removeItemsFromCollisionModel (sofa::core::CollisionElementIterator) const |
Handles Removing of topological element (from any type of topology) More... | |
Index | removeItemsFromCollisionModel (sofa::core::CollisionModel *model, const Index &index) const |
Index | removeItemsFromCollisionModel (sofa::core::CollisionModel *model, const type::vector< Index > &indices) const |
bool | incisionCollisionModel (sofa::core::CollisionElementIterator elem, sofa::type::Vec3 &pos, bool firstInput, int snapingValue=0, int snapingBorderValue=0) |
bool | incisionCollisionModel (sofa::core::CollisionModel *model1, Index idx1, const sofa::type::Vec3 &firstPoint, sofa::core::CollisionModel *model2, Index idx2, const sofa::type::Vec3 &secondPoint, int snapingValue=0, int snapingBorderValue=0) |
void | setIncisionFirstCut (bool isFirstCut) |
sofa::gui::component::performer::TopologicalChangeManager::TopologicalChangeManager | ( | ) |
sofa::gui::component::performer::TopologicalChangeManager::~TopologicalChangeManager | ( | ) |
bool sofa::gui::component::performer::TopologicalChangeManager::incisionCollisionModel | ( | sofa::core::CollisionElementIterator | elem, |
sofa::type::Vec3 & | pos, | ||
bool | firstInput, | ||
int | snapingValue = 0 , |
||
int | snapingBorderValue = 0 |
||
) |
Handles Cutting (activated only for a triangular topology)
Only one model is given. This function perform incision between input point and stocked information. If it is the first point of the incision, these information are stocked. i.e element index and picked point coordinates.
elem | - iterator to collision model. |
pos | - picked point coordinates. |
firstInput | - bool, if yes this is the first incision point. |
snapingValue | - threshold distance from point to incision path where point has to be snap on incision path. |
snapingBorderValue | - threshold distance from point to mesh border where incision is considered to reach the border.. |
bool sofa::gui::component::performer::TopologicalChangeManager::incisionCollisionModel | ( | sofa::core::CollisionModel * | model1, |
Index | idx1, | ||
const sofa::type::Vec3 & | firstPoint, | ||
sofa::core::CollisionModel * | model2, | ||
Index | idx2, | ||
const sofa::type::Vec3 & | secondPoint, | ||
int | snapingValue = 0 , |
||
int | snapingBorderValue = 0 |
||
) |
Handles Cutting for general model collision (activated only for a triangular topology for the moment).
Given two collision model, perform an incision between two points.
model1 | - first collision model. |
idx1 | - first element index. |
firstPoint | - first picked point coordinates. |
model2 | - second collision model. |
idx2 | - second element index. |
secondPoint | - second picked point coordinates. |
snapingValue | - threshold distance from point to incision path where point has to be snap on incision path. |
snapingBorderValue | - threshold distance from point to mesh border where incision is considered to reach the border.. |
Index sofa::gui::component::performer::TopologicalChangeManager::removeItemsFromCollisionModel | ( | sofa::core::CollisionElementIterator | elem2 | ) | const |
Handles Removing of topological element (from any type of topology)
Index sofa::gui::component::performer::TopologicalChangeManager::removeItemsFromCollisionModel | ( | sofa::core::CollisionModel * | model, |
const Index & | index | ||
) | const |
Index sofa::gui::component::performer::TopologicalChangeManager::removeItemsFromCollisionModel | ( | sofa::core::CollisionModel * | model, |
const type::vector< Index > & | indices | ||
) | const |
void sofa::gui::component::performer::TopologicalChangeManager::setIncisionFirstCut | ( | bool | isFirstCut | ) |
Sets incision starting parameter - incision is just started or already in course
isFirstCut | - true if the next incision event will be the first of a new incision |