Go to the documentation of this file.
16 #ifndef SURGSIM_PHYSICS_COMPUTATIONGROUP_H
17 #define SURGSIM_PHYSICS_COMPUTATIONGROUP_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);
std::vector< std::shared_ptr< Computation > > m_computations
Definition: ComputationGroup.h:71
boost::mutex m_computationsMutex
Definition: ComputationGroup.h:69
size_t m_iterations
Definition: ComputationGroup.h:67
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
Definition: CompoundShapeToGraphics.cpp:29
size_t getIterations()
Definition: ComputationGroup.cpp:87
ComputationGroup(bool copyState)
Constructor.
Definition: ComputationGroup.cpp:25
Implements a mechanism to group and loop computations, the computations will be called in sequence re...
Definition: ComputationGroup.h:33
std::vector< std::shared_ptr< Computation > > getComputations() const
Definition: ComputationGroup.cpp:75
~ComputationGroup()
Destructor.
Definition: ComputationGroup.cpp:31
virtual bool endIteration()
Override this function to implement a custom criterion to exit this computation, when this returns tr...
Definition: ComputationGroup.cpp:70
SURGSIM_CLASSNAME(SurgSim::Physics::ComputationGroup)
Encapsulates a calculation over a selection of objects, needs to be subclassed to be used.
Definition: Computation.h:32
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
void setComputations(const std::vector< std::shared_ptr< Computation >> &val)
Definition: ComputationGroup.cpp:81