39 #ifndef DART_GUI_OSG_IMGUIHANDLER_HPP_
40 #define DART_GUI_OSG_IMGUIHANDLER_HPP_
46 #include <osg/GraphicsContext>
47 #include <osgGA/GUIActionAdapter>
48 #include <osgGA/GUIEventAdapter>
49 #include <osgGA/GUIEventHandler>
66 void newFrame(::osg::RenderInfo& renderInfo);
68 void render(::osg::RenderInfo& renderInfo);
77 bool hasWidget(
const std::shared_ptr<ImGuiWidget>& widget)
const;
81 const std::shared_ptr<ImGuiWidget>& widget,
bool visible =
true);
84 void removeWidget(
const std::shared_ptr<ImGuiWidget>& widget);
93 const osgGA::GUIEventAdapter& eventAdapter,
94 osgGA::GUIActionAdapter& actionAdapter,
95 ::osg::Object*
object,
96 ::osg::NodeVisitor* nodeVisitor)
override;
106 std::vector<std::shared_ptr<ImGuiWidget>>
mWidgets;
Definition: ImGuiHandler.hpp:58
bool handle(const osgGA::GUIEventAdapter &eventAdapter, osgGA::GUIActionAdapter &actionAdapter, ::osg::Object *object, ::osg::NodeVisitor *nodeVisitor) override
Definition: ImGuiHandler.cpp:274
void render(::osg::RenderInfo &renderInfo)
Definition: ImGuiHandler.cpp:457
ImGuiHandler()
Constructor.
Definition: ImGuiHandler.cpp:179
void setCameraCallbacks(::osg::Camera *camera)
Definition: ImGuiHandler.cpp:219
double mTime
Definition: ImGuiHandler.hpp:99
void addWidget(const std::shared_ptr< ImGuiWidget > &widget, bool visible=true)
Adds given Widget to this Viewer.
Definition: ImGuiHandler.cpp:238
~ImGuiHandler() override
Destructor.
Definition: ImGuiHandler.cpp:213
void removeAllWidget()
Removes all the widgets in this Viewer.
Definition: ImGuiHandler.cpp:268
bool hasWidget(const std::shared_ptr< ImGuiWidget > &widget) const
Returns true if this Viewer contains given widget.
Definition: ImGuiHandler.cpp:232
std::array< bool, 3 > mMousePressed
Mouse buttons: left, right, middle.
Definition: ImGuiHandler.hpp:102
float mMouseWheel
Definition: ImGuiHandler.hpp:104
void removeWidget(const std::shared_ptr< ImGuiWidget > &widget)
Removes given Widget from this Viewer.
Definition: ImGuiHandler.cpp:254
std::vector< std::shared_ptr< ImGuiWidget > > mWidgets
Definition: ImGuiHandler.hpp:106
void newFrame(::osg::RenderInfo &renderInfo)
Definition: ImGuiHandler.cpp:429
Definition: BulletCollisionDetector.cpp:65