opensurgsim
MockPhysicsManager.h
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_TESTING_MOCKPHYSICSMANAGER_H
17 #define SURGSIM_TESTING_MOCKPHYSICSMANAGER_H
18 
19 #include "SurgSim/Physics/PhysicsManager.h"
20 
21 namespace SurgSim
22 {
23 namespace Testing
24 {
25 
28 {
29 public:
30  bool executeAdditions(const std::shared_ptr<SurgSim::Framework::Component>& component) override
31  {
33  }
34 
35  bool executeRemovals(const std::shared_ptr<SurgSim::Framework::Component>& component) override
36  {
38  }
39 
40  bool doInitialize() override
41  {
43  }
44 
45  bool doStartUp() override
46  {
47  return SurgSim::Physics::PhysicsManager::doStartUp();
48  }
49 
50  virtual bool doUpdate(double dt)
51  {
53  }
54 };
55 
56 } // namespace Physics
57 } // namespace SurgSim
58 
59 #endif // SURGSIM_TESTING_MOCKPHYSICSMANAGER_H
bool doInitialize() override
Initialize the Physics Manager Derived class(es) should override this method to have a customized lis...
Definition: MockPhysicsManager.h:40
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
bool doUpdate(double dt) override
Implementation of actual work function for this thread, this has a default implementation to handle d...
Definition: PhysicsManager.cpp:112
bool executeAdditions(const std::shared_ptr< SurgSim::Framework::Component > &component) override
Adds a component.
Definition: PhysicsManager.cpp:91
PhyicsManager handles the physics and motion calculation, it uses Computations to separate the algori...
Definition: PhysicsManager.h:59
bool executeRemovals(const std::shared_ptr< SurgSim::Framework::Component > &component) override
Handle representations, override for each thread.
Definition: PhysicsManager.cpp:103
bool doInitialize() override
Initialize the Physics Manager Derived class(es) should override this method to have a customized lis...
Definition: PhysicsManager.cpp:60
bool executeAdditions(const std::shared_ptr< SurgSim::Framework::Component > &component) override
Adds a component.
Definition: MockPhysicsManager.h:30
virtual bool doUpdate(double dt)
Implementation of actual work function for this thread, this has a default implementation to handle d...
Definition: MockPhysicsManager.h:50
bool executeRemovals(const std::shared_ptr< SurgSim::Framework::Component > &component) override
Handle representations, override for each thread.
Definition: MockPhysicsManager.h:35
Testing class used to publicly expose PhysicsManager&#39;s protected member functions.
Definition: MockPhysicsManager.h:27