-
Notifications
You must be signed in to change notification settings - Fork 4
Labels
issue: enhancementNew feature or requestNew feature or request
Description
The following lines could be replaced by an Operation:
CollisionAlgorithm/src/sofa/collisionAlgorithm/algorithm/InsertionAlgorithm.h
Lines 257 to 270 in ebd68b8
| const EdgeProximity::SPtr edgeProx = | |
| dynamic_pointer_cast<EdgeProximity>(shaftProx); | |
| if (edgeProx) | |
| { | |
| const type::Vec3 normal = (edgeProx->element()->getP1()->getPosition() - | |
| edgeProx->element()->getP0()->getPosition()) | |
| .normalized(); | |
| // If the (last) coupling point lies ahead of the tip (positive dot product), | |
| // the needle is retreating. Thus, that point is removed. | |
| if (dot(tip2Pt, normal) > 0_sreal) | |
| { | |
| m_couplingPts.pop_back(); | |
| } | |
| } |
The InsertionAlgorithm is a customized algorithm class for needle insertion. There could be equivalent customized Operation classes.
Metadata
Metadata
Assignees
Labels
issue: enhancementNew feature or requestNew feature or request