ContactConstraintGeneration.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_PHYSICS_CONTACTCONSTRAINTGENERATION_H
17 #define SURGSIM_PHYSICS_CONTACTCONSTRAINTGENERATION_H
18 
19 #include <memory>
20 
23 
24 
25 namespace SurgSim
26 {
27 
28 namespace Framework
29 {
30 class Logger;
31 }
32 
33 namespace DataStructures
34 {
35 struct Location;
36 }
37 namespace Collision
38 {
39 class Representation;
40 }
41 
42 namespace Physics
43 {
44 
45 class Localization;
46 class PhysicsManagerState;
47 class Representation;
48 
60 {
61 public:
64  explicit ContactConstraintGeneration(bool doCopyState = false);
65 
67 
70 
71 private:
73  std::shared_ptr<SurgSim::Framework::Logger> m_logger;
74 
80  std::shared_ptr<PhysicsManagerState> doUpdate(const double& dt, const std::shared_ptr<PhysicsManagerState>& state)
81  override;
82 
89  std::shared_ptr<SurgSim::DataStructures::Location> makeLocation(
90  std::shared_ptr<SurgSim::Physics::Representation> physicsRepresentation,
91  std::shared_ptr<SurgSim::Collision::Representation> collisionRepresentation,
92  const SurgSim::DataStructures::Location& location);
93 };
94 
95 }; // Physics
96 }; // SurgSim
97 
98 #endif
Definition: CompoundShapeToGraphics.cpp:29
A Location defines a local position w.r.t.
Definition: Location.h:39
std::shared_ptr< SurgSim::Framework::Logger > m_logger
The logger for this class.
Definition: ContactConstraintGeneration.h:73
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
Generate a constraint for every contact that was calculated.
Definition: ContactConstraintGeneration.h:59
Encapsulates a calculation over a selection of objects, needs to be subclassed to be used...
Definition: Computation.h:32