16 #ifndef SURGSIM_BLOCKS_KEYBOARDTOGGLESCOMPONENTBEHAVIOR_H 17 #define SURGSIM_BLOCKS_KEYBOARDTOGGLESCOMPONENTBEHAVIOR_H 19 #include <unordered_map> 20 #include <unordered_set> 47 typedef std::unordered_map<int, std::unordered_set<std::shared_ptr<SurgSim::Framework::Component>>>
58 void setInputComponent(std::shared_ptr<SurgSim::Framework::Component> inputComponent);
62 std::shared_ptr<SurgSim::Input::InputComponent> getInputComponent()
const;
80 virtual void update(
double dt)
override;
86 virtual bool doInitialize()
override;
91 virtual bool doWakeUp()
override;
107 #endif //SURGSIM_BLOCKS_KEYBOARDTOGGLESCOMPONENTBEHAVIOR_H Definition: DriveElementFromInputBehavior.cpp:27
std::shared_ptr< SurgSim::Input::InputComponent > m_inputComponent
Input component from which pressed keys come.
Definition: KeyboardTogglesComponentBehavior.h:98
std::unordered_map< int, std::unordered_set< std::shared_ptr< SurgSim::Framework::Component > > > KeyboardRegistryType
Definition: KeyboardTogglesComponentBehavior.h:48
Component is the main interface class to pass information to the system managers each will decide whe...
Definition: Component.h:43
KeyboardRegistryType m_registry
A mapping between key and the graphical representation(s) it controls.
Definition: KeyboardTogglesComponentBehavior.h:101
string(TOUPPER ${DEVICE}DEVICE_UPPER_CASE) option(BUILD_DEVICE_ $
Definition: CMakeLists.txt:35
#define SURGSIM_CLASSNAME(ClassName)
Declare the class name of a class with the appropriate function header, do not use quotes...
Definition: Macros.h:21
KeyCode
Definition: KeyCode.h:24
bool m_keyPressedLastUpdate
Record if any key is pressed in last update() call.
Definition: KeyboardTogglesComponentBehavior.h:95
This behavior is used to control the visibility of registered graphical representation(s) ...
Definition: KeyboardTogglesComponentBehavior.h:44
Behaviors perform actions.
Definition: Behavior.h:40
SURGSIM_STATIC_REGISTRATION(PoseComponent)