opensurgsim
MockObjects.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_PARTICLES_UNITTESTS_MOCKOBJECTS_H
17 #define SURGSIM_PARTICLES_UNITTESTS_MOCKOBJECTS_H
18 
19 #include "SurgSim/Framework/Behavior.h"
20 #include "SurgSim/Framework/ObjectFactory.h"
21 #include "SurgSim/Particles/Emitter.h"
22 #include "SurgSim/Particles/Representation.h"
23 
24 
26 {
27 public:
28  explicit MockParticleSystem(const std::string& name);
29  SURGSIM_CLASSNAME(MockParticleSystem);
30  int updateCount;
31 
32 private:
33  bool doUpdate(double dt) override;
34  bool doHandleCollisions(double dt, const SurgSim::Collision::ContactMapType& collisions) override;
35 };
36 
38 {
39 public:
40  explicit MockEmitter(const std::string& name);
41  void update(double dt) override;
42  int updateCount;
43 };
44 
45 #endif //SURGSIM_PARTICLES_UNITTESTS_MOCKOBJECTS_H
46 
47 
Definition: MockObjects.h:25
The Representation class defines the base class for all Particle System.
Definition: Representation.h:40
void update(double dt)
Update the particle system.
Definition: Representation.cpp:94
Emitter emits particles into a ParticleSystem.
Definition: Emitter.h:61
Definition: MockObjects.h:37