16 #ifndef SURGSIM_BLOCKS_FUNCTIONBEHAVIOR_H 17 #define SURGSIM_BLOCKS_FUNCTIONBEHAVIOR_H 22 #include "SurgSim/Framework/Behavior.h" 30 SURGSIM_STATIC_REGISTRATION(FunctionBehavior);
82 void setFunction(std::function<
void(
double)>
function);
90 void update(
double dt)
override;
93 bool doInitialize()
override;
95 bool doWakeUp()
override;
101 std::function<void(double)> m_function;
107 #endif // SURGSIM_BLOCKS_FUNCTIONBEHAVIOR_H int getTargetManagerType() const override
Specifies which manger will handle this behavior.
Definition: FunctionBehavior.cpp:47
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
A Behavior that can run any callable target in its update function.
Definition: FunctionBehavior.h:71
FunctionBehavior(const std::string &name)
Constructor.
Definition: FunctionBehavior.cpp:28
void setFunction(std::function< void(double)> function)
Set the function to run in this behavior's update.
Definition: FunctionBehavior.cpp:52
void setTargetManagerType(int type)
Set which manager will handle this behavior.
Definition: FunctionBehavior.cpp:40
Behaviors perform actions.
Definition: Behavior.h:40
void update(double dt) override
Update the behavior.
Definition: FunctionBehavior.cpp:35