16 #ifndef SURGSIM_PHYSICS_COMPUTATION_H 17 #define SURGSIM_PHYSICS_COMPUTATION_H 22 #include "SurgSim/Framework/Timer.h" 29 class PhysicsManagerState;
49 std::shared_ptr<PhysicsManagerState>
update(
double dt,
const std::shared_ptr<PhysicsManagerState>& state);
71 virtual std::shared_ptr<PhysicsManagerState>
doUpdate(
73 const std::shared_ptr<PhysicsManagerState>& state) = 0;
79 std::shared_ptr<PhysicsManagerState> preparePhysicsState(
const std::shared_ptr<PhysicsManagerState>& state);
89 #endif // SURGSIM_PHYSICS_COMPUTATION_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
virtual ~Computation()
Destructor.
Definition: Computation.cpp:31
std::shared_ptr< PhysicsManagerState > update(double dt, const std::shared_ptr< PhysicsManagerState > &state)
Public Interface execute this objects computations, dt is the time from the last update call in secon...
Definition: Computation.cpp:36
Framework::Timer & getTimer()
Provides access to the update timer.
Definition: Computation.cpp:54
void setDoCopyState(bool val)
Sets up whether the computation will copy the state of PhysicsManagerState before executing...
Definition: Computation.cpp:44
Timer class, measures execution times.
Definition: Timer.h:31
virtual std::shared_ptr< PhysicsManagerState > doUpdate(const double &dt, const std::shared_ptr< PhysicsManagerState > &state)=0
Override this function to implement the computations specific behavior.
Encapsulates a calculation over a selection of objects, needs to be subclassed to be used...
Definition: Computation.h:32
virtual std::string getClassName() const =0
The class name for this class.
Computation(bool doCopyState)
Constructor.
Definition: Computation.cpp:26
bool isCopyingState()
Query if this object is copying the PhysicsManagerState.
Definition: Computation.cpp:49