File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ class DetectionOutput {
5858 m_output.push_back (PairDetection (p1,p2));
5959 }
6060
61+ inline void add (const DetectionOutput& addition) {
62+ for (auto & it : addition)
63+ this ->add (it.first , it.second );
64+ }
65+
6166 inline const PairDetection & operator [](int i) const {
6267 return m_output[i];
6368 }
Original file line number Diff line number Diff line change @@ -119,10 +119,7 @@ void InsertionAlgorithm::doDetection()
119119 // Shaft collision sequence - Disable if coupling points have been added
120120 sofa::helper::AdvancedTimer::stepBegin (" Shaft collision - " + this ->getName ());
121121 if (d_enableShaftCollision.getValue () && m_couplingPts.empty ())
122- {
123- AlgorithmOutput shaftCollisions = shaftCollisionPhase ();
124- for (auto & it : shaftCollisions) collisionOutput.add (it.first , it.second );
125- }
122+ collisionOutput.add (shaftCollisionPhase ());
126123 sofa::helper::AdvancedTimer::stepEnd (" Shaft collision - " + this ->getName ());
127124 }
128125 else
You can’t perform that action at this time.
0 commit comments