iMSTK
Interactive Medical Simulation Toolkit
imstkCompoundCD.h
1 /*
2 ** This file is part of the Interactive Medical Simulation Toolkit (iMSTK)
3 ** iMSTK is distributed under the Apache License, Version 2.0.
4 ** See accompanying NOTICE for details.
5 */
6 
7 #pragma once
8 
9 #include "imstkCollisionDetectionAlgorithm.h"
10 #include "imstkMacros.h"
11 
12 namespace imstk
13 {
24 {
25 public:
26  CompoundCD();
27  ~CompoundCD() override = default;
28 
29  IMSTK_TYPE_NAME(CompoundCD);
30 
31  void requestUpdate() override;
32 
33 protected:
34 
35  bool areInputsValid() override;
36 
37 private:
39  std::vector<std::shared_ptr<CollisionDetectionAlgorithm>> m_cdAlgorithms;
40 };
41 } // namespace imstk
bool areInputsValid() override
Check inputs are correct (always works reversibly)
Base class for all collision detection classes. CollisionDetection classes produce CollisionData betw...
Compound Geometry.
void requestUpdate() override
Compute the collision data.
Collision detection that supports a geometry consisting of multiple subgeometries. For the actual calcualation the information gets passed to the appropriate shape/subshape CD algorithm. Currently Does not support adding/removing a shape during runtime.