iMSTK
Interactive Medical Simulation Toolkit
imstkPbdRigidObjectGrasping.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 "imstkPbdObjectGrasping.h"
10 
11 namespace imstk
12 {
13 class PbdObject;
14 class RigidObject2;
15 class TaskNode;
16 
18 {
19 public:
21  std::shared_ptr<PbdObject> obj1,
22  std::shared_ptr<RigidObject2> obj2);
23 
24  ~PbdRigidObjectGrasping() override = default;
25 
26  IMSTK_TYPE_NAME(PbdRigidObjectGrasping)
27 
28  void updatePicking();
29 
31  const std::vector<PbdParticleId>& ptsA,
32  const std::vector<double>& weightsA,
33  const std::vector<PbdParticleId>& ptsB,
34  const std::vector<double>& weightsB,
35  double stiffnessA, double stiffnessB) override;
36 
37  void initGraphEdges(std::shared_ptr<TaskNode> source, std::shared_ptr<TaskNode> sink) override;
38 
39 protected:
40  std::shared_ptr<RigidObject2> m_rbdObj = nullptr;
41  std::shared_ptr<PbdObject> m_pbdObj = nullptr;
42 };
43 } // namespace imstk
void updatePicking()
Update picking state, this should move grasp points.
This class defines grasping of a PbdObject via different picking methods. Where grasping is define as...
Compound Geometry.
void addPointToPointConstraint(const std::vector< PbdParticleId > &ptsA, const std::vector< double > &weightsA, const std::vector< PbdParticleId > &ptsB, const std::vector< double > &weightsB, double stiffnessA, double stiffnessB) override
Add constraint between a point on each element given via barycentric coordinates pt position = weight...
void initGraphEdges()
Initializes the edges of the SceneObject&#39;s computational graph.