16 #ifndef EXAMPLES_STAPLING_STAPLERBEHAVIOR_H 17 #define EXAMPLES_STAPLING_STAPLERBEHAVIOR_H 22 #include <unordered_map> 24 #include "SurgSim/Framework/Behavior.h" 25 #include "SurgSim/Framework/ObjectFactory.h" 26 #include "SurgSim/Collision/Representation.h" 31 namespace DataStructures
43 class SceneryRepresentation;
74 void setInputComponent(std::shared_ptr<SurgSim::Framework::Component> inputComponent);
77 std::shared_ptr<SurgSim::Input::InputComponent> getInputComponent();
81 void setRepresentation(std::shared_ptr<SurgSim::Framework::Component> staplerRepresentation);
84 std::shared_ptr<SurgSim::Framework::Representation> getRepresentation();
88 void update(
double dt)
override;
92 int getTargetManagerType()
const override;
96 void setVirtualTeeth(
const std::array<std::shared_ptr<SurgSim::Collision::Representation>, 2>& virtualTeeth);
99 const std::array<std::shared_ptr<SurgSim::Collision::Representation>, 2>& getVirtualTeeth();
103 void enableStaplingForSceneElement(
const std::string& sceneElementName);
107 void setStapleEnabledSceneElements(
const std::list<std::string>& stapleEnabledSceneElements);
110 const std::list<std::string>& getStapleEnabledSceneElements();
116 bool doInitialize()
override;
121 bool doWakeUp()
override;
127 void filterCollisionMapForStapleEnabledRepresentations(SurgSim::Collision::ContactMapType *collisionsMap);
132 std::shared_ptr<SurgSim::Physics::Representation> findCorrespondingPhysicsRepresentation(
133 std::shared_ptr<SurgSim::Collision::Representation> collisionRepresentation);
137 void filterCollisionMapForSupportedRepresentationTypes(SurgSim::Collision::ContactMapType* collisionsMap);
145 std::shared_ptr<SurgSim::Input::InputComponent> m_from;
148 std::shared_ptr<SurgSim::Framework::Representation> m_representation;
157 bool m_button1IndexCached;
160 bool m_buttonPreviouslyPressed;
163 std::array<std::shared_ptr<SurgSim::Collision::Representation>, 2> m_virtualTeeth;
166 std::list<std::string> m_stapleEnabledSceneElements;
169 #endif // EXAMPLES_STAPLING_STAPLERBEHAVIOR_H Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui n...
Definition: AddRandomSphereBehavior.cpp:36
This behavior is used to add staples.
Definition: StaplerBehavior.h:63
Behaviors perform actions.
Definition: Behavior.h:40