opensurgsim
ContactFilter.h
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013-2016, 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_COLLISION_CONTACTFILTER_H
17 #define SURGSIM_COLLISION_CONTACTFILTER_H
18 
19 
20 #include "SurgSim/Framework/Component.h"
21 
22 #include <string>
23 
24 namespace SurgSim
25 {
26 
27 namespace Physics
28 {
29 class PhysicsManagerState;
30 }
31 
32 namespace Collision
33 {
34 class CollisionPair;
35 
41 {
42 public:
44  explicit ContactFilter(const std::string& name);
45 
49  void filterContacts(
50  const std::shared_ptr<Physics::PhysicsManagerState>& state,
51  const std::shared_ptr<CollisionPair>& pair);
52 
56  void update(double dt);
57 
58 protected:
59 
62  virtual void doFilterContacts(const std::shared_ptr<Physics::PhysicsManagerState>& state,
63  const std::shared_ptr<CollisionPair>& pair) = 0;
64 
65  virtual void doUpdate(double dt) = 0;
66 
67 };
68 
69 }
70 }
71 
72 #endif
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:42
Base class to implement a contact filter, the job of this class is to be executed by the ContactFilte...
Definition: ContactFilter.h:40