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>
65 void newFrame(::osg::RenderInfo& renderInfo);
67 void render(::osg::RenderInfo& renderInfo);
76 bool hasWidget(
const std::shared_ptr<ImGuiWidget>& widget)
const;
79 void addWidget(
const std::shared_ptr<ImGuiWidget>& widget,
83 void removeWidget(
const std::shared_ptr<ImGuiWidget>& widget);
91 bool handle(
const osgGA::GUIEventAdapter& eventAdapter,
92 osgGA::GUIActionAdapter& actionAdapter,
93 ::osg::Object*
object,
94 ::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:276
void render(::osg::RenderInfo &renderInfo)
Definition: ImGuiHandler.cpp:385
void init()
Definition: ImGuiHandler.cpp:182
ImGuiHandler()
Constructor.
Definition: ImGuiHandler.cpp:172
GLuint mFontTexture
Definition: ImGuiHandler.hpp:104
void setCameraCallbacks(::osg::Camera *camera)
Definition: ImGuiHandler.cpp:220
double mTime
Definition: ImGuiHandler.hpp:97
void addWidget(const std::shared_ptr< ImGuiWidget > &widget, bool visible=true)
Adds given Widget to this Viewer.
Definition: ImGuiHandler.cpp:239
void removeAllWidget()
Removes all the widgets in this Viewer.
Definition: ImGuiHandler.cpp:270
bool hasWidget(const std::shared_ptr< ImGuiWidget > &widget) const
Returns true if this Viewer contains given widget.
Definition: ImGuiHandler.cpp:233
std::array< bool, 3 > mMousePressed
Mouse buttons: left, right, middle.
Definition: ImGuiHandler.hpp:100
float mMouseWheel
Definition: ImGuiHandler.hpp:102
void removeWidget(const std::shared_ptr< ImGuiWidget > &widget)
Removes given Widget from this Viewer.
Definition: ImGuiHandler.cpp:255
std::vector< std::shared_ptr< ImGuiWidget > > mWidgets
Definition: ImGuiHandler.hpp:106
void newFrame(::osg::RenderInfo &renderInfo)
Definition: ImGuiHandler.cpp:357
Definition: BulletCollisionDetector.cpp:63