Skip to content

Commit 7600790

Browse files
th-skamepernod
andauthored
[algorithm] Split algorithm phases in different functions (#101)
* [algorithm] Remove projection operation on tip in the InsertionAlgorithm- completely unnecessary * [algorithm] Changed FindClosestProximityAlgorithm to find the closest proximity back on the from geometry * [algorithm] Auto-format code * [algorithm] Rewrite some comments * [algorithm] Place shared operations at the top * [algorithm] Add a bool to enable/disable the puncture sequence * [algorithm] Add a bool to enable/disable insertion sequence * [algorithm] Add a bool to enable/disable shaft collision sequence * [algorithm] auto format code * [algorithm] Absorb the FindClosestProximity for shaft collision * [algorithm] Add an experimental component in the algorithm * [algorithm] Remove FindClosestProximityAlgorithm * [cmake] Remove FindClosestProximityAlgorithm from CMakeLists * [algorithm] Make sanity checks happen only when appropriate for some data * [algorithm] Place geometry checks in InsertionAlgorithm when they make sense * [timer] Add the name of the AABBBroadPhase component during profiling * [timer] Add a timer to the doDetection function * [timer] Add a timer inside the doUpdate broadphase function * [timer] Add advanced timers in the InsertionAlgorithm * [algorithm] Modify loop to suppress warning * [algorithm] Move function definitions in source file * [src] Explicitly define default copy/move construtors/operators in DetectionOutput Ensure they are used across C++ standard evolution * [algorithm] Move puncture phase code in dedicated method * [algorithm] Moved shaft collision code to dedicated function * [src] Overload add function with DetectionOutput signature to shorten code * [algorithm] Moved insertion code to separate functions * [algorithm] Leave some space in code lines * [cmake] Fix ommission * [algorithm] Remove duplicated code for coupling point pruning - merge leftover --------- Co-authored-by: epernod <[email protected]>
1 parent 1554d92 commit 7600790

File tree

4 files changed

+246
-177
lines changed

4 files changed

+246
-177
lines changed

src/CollisionAlgorithm/DataDetectionOutput.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ class DetectionOutput {
1313
public:
1414
typedef std::pair<typename FIRST::SPtr,typename SECOND::SPtr> PairDetection;
1515

16+
DetectionOutput() = default;
17+
~DetectionOutput() = default;
18+
19+
// Copy
20+
DetectionOutput(const DetectionOutput&) = default;
21+
DetectionOutput& operator=(const DetectionOutput&) = default;
22+
23+
// Move
24+
DetectionOutput(DetectionOutput&&) noexcept = default;
25+
DetectionOutput& operator=(DetectionOutput&&) noexcept = default;
26+
1627
friend std::ostream& operator<<(std::ostream& os, const DetectionOutput& t) {
1728
os << t.m_output.size() << ":" ;
1829
for (unsigned i=0;i<t.m_output.size();i++) {
@@ -47,6 +58,11 @@ class DetectionOutput {
4758
m_output.push_back(PairDetection(p1,p2));
4859
}
4960

61+
inline void add(const DetectionOutput& addition) {
62+
for (auto& it : addition)
63+
this->add(it.first, it.second);
64+
}
65+
5066
inline const PairDetection & operator[](int i) const {
5167
return m_output[i];
5268
}

0 commit comments

Comments
 (0)