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

Abstract class for plugins All plugins MUST have this class as their parent and may implement any/all the callbacks marked virtual here. More...

#include <ViewerPlugin.h>

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

Public Member Functions

 ViewerPlugin ()
 
virtual ~ViewerPlugin ()
 
virtual void init (Viewer *_viewer)
 This function is called when the viewer is initialized (no mesh will be loaded at this stage)
 
virtual void shutdown ()
 This function is called before shutdown.
 
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.
 
virtual bool pre_draw ()
 This function is called before the draw procedure of Viewer.
 
virtual bool post_draw ()
 This function is called after the draw procedure of Viewer.
 
virtual void post_resize (int, int)
 This function is called after the window has been resized.
 
virtual bool mouse_down (int, int)
 
virtual bool mouse_up (int, int)
 
virtual bool mouse_move (int, int)
 
virtual bool mouse_scroll (float)
 
virtual bool key_pressed (unsigned int, int)
 
virtual bool key_down (int, int)
 
virtual bool key_up (int, int)
 

Public Attributes

std::string plugin_name
 

Protected Attributes

Viewerviewer
 

Detailed Description

Abstract class for plugins All plugins MUST have this class as their parent and may implement any/all the callbacks marked virtual here.

Return value of callbacks: returning true to any of the callbacks tells Viewer that the event has been handled and that it should not be passed to other plugins or to other internal functions of Viewer

Constructor & Destructor Documentation

◆ ViewerPlugin()

igl::opengl::glfw::ViewerPlugin::ViewerPlugin ( )
inline

◆ ~ViewerPlugin()

virtual igl::opengl::glfw::ViewerPlugin::~ViewerPlugin ( )
inlinevirtual

Member Function Documentation

◆ init()

virtual void igl::opengl::glfw::ViewerPlugin::init ( Viewer _viewer)
inlinevirtual

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

Reimplemented in igl::opengl::glfw::imgui::ImGuiPlugin.

◆ shutdown()

virtual void igl::opengl::glfw::ViewerPlugin::shutdown ( )
inlinevirtual

This function is called before shutdown.

Reimplemented in igl::opengl::glfw::imgui::ImGuiPlugin.

◆ load()

virtual bool igl::opengl::glfw::ViewerPlugin::load ( std::string  )
inlinevirtual

This function is called before a mesh is loaded.

◆ save()

virtual bool igl::opengl::glfw::ViewerPlugin::save ( std::string  )
inlinevirtual

This function is called before a mesh is saved.

◆ serialize()

virtual bool igl::opengl::glfw::ViewerPlugin::serialize ( std::vector< char > &  ) const
inlinevirtual

This function is called when the scene is serialized.

◆ deserialize()

virtual bool igl::opengl::glfw::ViewerPlugin::deserialize ( const std::vector< char > &  )
inlinevirtual

This function is called when the scene is deserialized.

◆ post_load()

virtual bool igl::opengl::glfw::ViewerPlugin::post_load ( )
inlinevirtual

Runs immediately after a new mesh has been loaded.

◆ pre_draw()

virtual bool igl::opengl::glfw::ViewerPlugin::pre_draw ( )
inlinevirtual

This function is called before the draw procedure of Viewer.

Reimplemented in igl::opengl::glfw::imgui::ImGuiPlugin.

◆ post_draw()

virtual bool igl::opengl::glfw::ViewerPlugin::post_draw ( )
inlinevirtual

This function is called after the draw procedure of Viewer.

Reimplemented in igl::opengl::glfw::imgui::ImGuiPlugin.

◆ post_resize()

virtual void igl::opengl::glfw::ViewerPlugin::post_resize ( int  ,
int   
)
inlinevirtual

This function is called after the window has been resized.

Reimplemented in igl::opengl::glfw::imgui::ImGuiPlugin.

◆ mouse_down()

virtual bool igl::opengl::glfw::ViewerPlugin::mouse_down ( int  ,
int   
)
inlinevirtual

◆ mouse_up()

virtual bool igl::opengl::glfw::ViewerPlugin::mouse_up ( int  ,
int   
)
inlinevirtual

◆ mouse_move()

virtual bool igl::opengl::glfw::ViewerPlugin::mouse_move ( int  ,
int   
)
inlinevirtual

◆ mouse_scroll()

virtual bool igl::opengl::glfw::ViewerPlugin::mouse_scroll ( float  )
inlinevirtual

◆ key_pressed()

virtual bool igl::opengl::glfw::ViewerPlugin::key_pressed ( unsigned int  ,
int   
)
inlinevirtual

◆ key_down()

virtual bool igl::opengl::glfw::ViewerPlugin::key_down ( int  ,
int   
)
inlinevirtual

◆ key_up()

virtual bool igl::opengl::glfw::ViewerPlugin::key_up ( int  ,
int   
)
inlinevirtual

Member Data Documentation

◆ plugin_name

std::string igl::opengl::glfw::ViewerPlugin::plugin_name

◆ viewer

Viewer* igl::opengl::glfw::ViewerPlugin::viewer
protected

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