libigl v2.5.0
Loading...
Searching...
No Matches
igl::opengl::glfw::imgui::ImGuiPlugin Class Reference

Plugin for the viewer to enable imgui widgets. More...

#include <ImGuiPlugin.h>

Inheritance diagram for igl::opengl::glfw::imgui::ImGuiPlugin:
igl::opengl::glfw::ViewerPlugin

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
Viewerviewer
 

Detailed Description

Plugin for the viewer to enable imgui widgets.

Member Function Documentation

◆ init()

virtual void igl::opengl::glfw::imgui::ImGuiPlugin::init ( igl::opengl::glfw::Viewer _viewer)
overridevirtual

This function is called when the viewer is initialized (no mesh will be loaded at this stage)

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ init_widgets()

void igl::opengl::glfw::imgui::ImGuiPlugin::init_widgets ( )

◆ reload_font()

virtual void igl::opengl::glfw::imgui::ImGuiPlugin::reload_font ( int  font_size = 13)
virtual

◆ shutdown()

virtual void igl::opengl::glfw::imgui::ImGuiPlugin::shutdown ( )
overridevirtual

This function is called before shutdown.

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ pre_draw()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::pre_draw ( )
overridevirtual

This function is called before the draw procedure of Viewer.

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ post_draw()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::post_draw ( )
overridevirtual

This function is called after the draw procedure of Viewer.

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ post_resize()

virtual void igl::opengl::glfw::imgui::ImGuiPlugin::post_resize ( int  ,
int   
)
overridevirtual

This function is called after the window has been resized.

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ mouse_down()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::mouse_down ( int  button,
int  modifier 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ mouse_up()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::mouse_up ( int  button,
int  modifier 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ mouse_move()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::mouse_move ( int  mouse_x,
int  mouse_y 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ mouse_scroll()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::mouse_scroll ( float  delta_y)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ key_pressed()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::key_pressed ( unsigned int  key,
int  modifiers 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ key_down()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::key_down ( int  key,
int  modifiers 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ key_up()

virtual bool igl::opengl::glfw::imgui::ImGuiPlugin::key_up ( int  key,
int  modifiers 
)
overridevirtual

Reimplemented from igl::opengl::glfw::ViewerPlugin.

◆ draw_text()

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) 
)

◆ pixel_ratio()

float igl::opengl::glfw::imgui::ImGuiPlugin::pixel_ratio ( )

◆ hidpi_scaling()

float igl::opengl::glfw::imgui::ImGuiPlugin::hidpi_scaling ( )

Member Data Documentation

◆ hidpi_scaling_

float igl::opengl::glfw::imgui::ImGuiPlugin::hidpi_scaling_
protected

◆ pixel_ratio_

float igl::opengl::glfw::imgui::ImGuiPlugin::pixel_ratio_
protected

◆ context_

ImGuiContext* igl::opengl::glfw::imgui::ImGuiPlugin::context_ = nullptr
protected

◆ widgets

std::vector<ImGuiWidget*> igl::opengl::glfw::imgui::ImGuiPlugin::widgets

The documentation for this class was generated from the following file: