16 #ifndef SURGSIM_PHYSICS_COMPUTATIONGROUP_H 17 #define SURGSIM_PHYSICS_COMPUTATIONGROUP_H 19 #include "SurgSim/Physics/Computation.h" 20 #include "SurgSim/Framework/Macros.h" 22 #include <boost/thread.hpp> 44 std::shared_ptr<PhysicsManagerState>
doUpdate(
const double& dt,
45 const std::shared_ptr<PhysicsManagerState>& state)
override;
55 void addComputation(
const std::shared_ptr<Computation>& computation);
61 void setComputations(
const std::vector<std::shared_ptr<Computation>>& val);
69 mutable boost::mutex m_computationsMutex;
71 std::vector<std::shared_ptr<Computation>> m_computations;
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
Implements a mechanism to group and loop computations, the computations will be called in sequence re...
Definition: ComputationGroup.h:33
void setComputations(const std::vector< std::shared_ptr< Computation >> &val)
Definition: ComputationGroup.cpp:81
size_t getIterations()
Definition: ComputationGroup.cpp:87
virtual bool endIteration()
Override this function to implement a custom criterion to exit this computation, when this returns tr...
Definition: ComputationGroup.cpp:70
void addComputation(const std::shared_ptr< Computation > &computation)
Adds a computation to this group, the computation will be appended at the end.
Definition: ComputationGroup.cpp:64
ComputationGroup(bool copyState)
Constructor.
Definition: ComputationGroup.cpp:25
std::shared_ptr< PhysicsManagerState > doUpdate(const double &dt, const std::shared_ptr< PhysicsManagerState > &state) override
Override this function to implement the computations specific behavior.
Definition: ComputationGroup.cpp:36
Encapsulates a calculation over a selection of objects, needs to be subclassed to be used...
Definition: Computation.h:32
~ComputationGroup()
Destructor.
Definition: ComputationGroup.cpp:31
std::vector< std::shared_ptr< Computation > > getComputations() const
Definition: ComputationGroup.cpp:75