libigl v2.5.0
|
Plugin for the viewer to enable imgui widgets. More...
#include <ImGuiPlugin.h>
Public Member Functions | |
virtual void | init (igl::opengl::glfw::Viewer *_viewer) override |
This function is called when the viewer is initialized (no mesh will be loaded at this stage) | |
void | init_widgets () |
virtual void | reload_font (int font_size=13) |
virtual void | shutdown () override |
This function is called before shutdown. | |
virtual bool | pre_draw () override |
This function is called before the draw procedure of Viewer. | |
virtual bool | post_draw () override |
This function is called after the draw procedure of Viewer. | |
virtual void | post_resize (int width, int height) override |
This function is called after the window has been resized. | |
virtual bool | mouse_down (int button, int modifier) override |
virtual bool | mouse_up (int button, int modifier) override |
virtual bool | mouse_move (int mouse_x, int mouse_y) override |
virtual bool | mouse_scroll (float delta_y) override |
virtual bool | key_pressed (unsigned int key, int modifiers) override |
virtual bool | key_down (int key, int modifiers) override |
virtual bool | key_up (int key, int modifiers) override |
void | draw_text (const Eigen::Vector3d pos, const Eigen::Vector3d normal, const std::string &text, const Eigen::Vector4f color=Eigen::Vector4f(0, 0, 0.04, 1)) |
float | pixel_ratio () |
float | hidpi_scaling () |
Public Member Functions inherited from igl::opengl::glfw::ViewerPlugin | |
ViewerPlugin () | |
virtual | ~ViewerPlugin () |
virtual bool | load (std::string) |
This function is called before a mesh is loaded. | |
virtual bool | save (std::string) |
This function is called before a mesh is saved. | |
virtual bool | serialize (std::vector< char > &) const |
This function is called when the scene is serialized. | |
virtual bool | deserialize (const std::vector< char > &) |
This function is called when the scene is deserialized. | |
virtual bool | post_load () |
Runs immediately after a new mesh has been loaded. | |
Public Attributes | |
std::vector< ImGuiWidget * > | widgets |
Public Attributes inherited from igl::opengl::glfw::ViewerPlugin | |
std::string | plugin_name |
Protected Attributes | |
float | hidpi_scaling_ |
float | pixel_ratio_ |
ImGuiContext * | context_ = nullptr |
Protected Attributes inherited from igl::opengl::glfw::ViewerPlugin | |
Viewer * | viewer |
Plugin for the viewer to enable imgui widgets.
|
overridevirtual |
This function is called when the viewer is initialized (no mesh will be loaded at this stage)
Reimplemented from igl::opengl::glfw::ViewerPlugin.
void igl::opengl::glfw::imgui::ImGuiPlugin::init_widgets | ( | ) |
|
virtual |
|
overridevirtual |
This function is called before shutdown.
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
This function is called before the draw procedure of Viewer.
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
This function is called after the draw procedure of Viewer.
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
This function is called after the window has been resized.
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
|
overridevirtual |
Reimplemented from igl::opengl::glfw::ViewerPlugin.
void igl::opengl::glfw::imgui::ImGuiPlugin::draw_text | ( | const Eigen::Vector3d | pos, |
const Eigen::Vector3d | normal, | ||
const std::string & | text, | ||
const Eigen::Vector4f | color = Eigen::Vector4f(0, 0, 0.04, 1) |
||
) |
float igl::opengl::glfw::imgui::ImGuiPlugin::pixel_ratio | ( | ) |
float igl::opengl::glfw::imgui::ImGuiPlugin::hidpi_scaling | ( | ) |
|
protected |
|
protected |
|
protected |
std::vector<ImGuiWidget*> igl::opengl::glfw::imgui::ImGuiPlugin::widgets |