iMSTK
Interactive Medical Simulation Toolkit
imstkRigidObjectLevelSetCollision.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 "imstkCollisionInteraction.h"
10 #include "imstkMacros.h"
11 
12 namespace imstk
13 {
14 class LevelSetDeformableObject;
15 class RigidObject2;
16 template<typename T, int N> class VecDataArray;
17 
25 {
26 public:
27  RigidObjectLevelSetCollision(std::shared_ptr<RigidObject2> obj1, std::shared_ptr<LevelSetDeformableObject> obj2);
28  ~RigidObjectLevelSetCollision() override = default;
29 
30  IMSTK_TYPE_NAME(RigidObjectLevelSetCollision)
31 
32 
33  void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink) override;
36 
37  void copyVertsToPrevious();
38  void measureDisplacementFromPrevious();
39 
40  std::shared_ptr<VecDataArray<double, 3>> m_prevVertices;
41 
42 protected:
43  std::shared_ptr<TaskNode> m_copyVertToPrevNode = nullptr;
44  std::shared_ptr<TaskNode> m_computeDisplacementNode = nullptr;
45 };
46 } // namespace imstk
This class defines a collision interaction pipeline between a RigidObject and LevelSetDeformableObjec...
Compound Geometry.
Abstract class for defining collision interactions between objects.
void initGraphEdges()
Initializes the edges of the SceneObject&#39;s computational graph.