16 #ifndef SURGSIM_PHYSICS_PHYSICSMANAGER_H 17 #define SURGSIM_PHYSICS_PHYSICSMANAGER_H 19 #include <boost/thread/mutex.hpp> 25 #include "SurgSim/Framework/ComponentManager.h" 26 #include "SurgSim/Framework/LockedContainer.h" 27 #include "SurgSim/Physics/PhysicsManagerState.h" 68 int getType()
const override;
80 void addComputation(std::shared_ptr<SurgSim::Physics::Computation> computation);
85 void setComputations(std::vector<std::shared_ptr<Physics::Computation>> computations);
88 bool executeAdditions(
const std::shared_ptr<SurgSim::Framework::Component>& component)
override;
90 bool executeRemovals(
const std::shared_ptr<SurgSim::Framework::Component>& component)
override;
96 bool doInitialize()
override;
98 bool doStartUp()
override;
100 bool doUpdate(
double dt)
override;
102 void doBeforeStop()
override;
104 std::vector<std::shared_ptr<Representation>> m_representations;
106 std::vector<std::shared_ptr<Collision::Representation>> m_collisionRepresentations;
108 std::vector<std::shared_ptr<Collision::ContactFilter>> m_contactFilters;
110 std::vector<std::shared_ptr<Particles::Representation>> m_particleRepresentations;
112 std::vector<std::shared_ptr<ConstraintComponent>> m_constraintComponents;
124 std::vector<std::shared_ptr<Physics::Computation>> createDcdPipeline(
bool copyState =
false);
128 std::vector<std::shared_ptr<Physics::Computation>> createCcdPipeline(
bool copyState =
false);
Definition: PhysicsManagerTests.cpp:67
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
PhyicsManager handles the physics and motion calculation, it uses Computations to separate the algori...
Definition: PhysicsManager.h:59
Base Component Manager class.
Definition: ComponentManager.h:49
A simple thread-safe data container that can support multiple writers and readers.
Definition: LockedContainer.h:54
Definition: PhysicsManagerState.h:48
std::vector< std::shared_ptr< SurgSim::Physics::Computation > > m_computations
A list of computations, to perform the physics update.
Definition: PhysicsManager.h:116
SurgSim::Framework::LockedContainer< SurgSim::Physics::PhysicsManagerState > m_finalState
A thread-safe copy of the last PhysicsManagerState in the previous update.
Definition: PhysicsManager.h:119