MeshLib Documentation
Loading...
Searching...
No Matches
MRViewerPlugin.h
Go to the documentation of this file.
1#pragma once
2
3// TODO:
4// * create plugins/skeleton.h
5// * pass time in draw function
6// * remove Preview3D from comments
7// * clean comments
8
9#include "MRViewerInstance.h"
10#include <filesystem>
11#include <vector>
12
13namespace MR
14{
15
16// Abstract class for plugins
17// All plugins MUST have this class as their parent and may implement any/all
18// the callbacks marked `virtual` here.
19//
20// /////For an example of a basic plugins see plugins/skeleton.h
21//
22// Return value of callbacks: returning true to any of the callbacks tells
23// Viewer that the event has been handled and that it should not be passed to
24// other plugins or to other internal functions of Viewer
25
27{
28public:
29 virtual ~ViewerPlugin()
30 {
31 }
32
33 // This function is called when the viewer is initialized (no mesh will be loaded at this stage)
34 virtual void init( Viewer *_viewer )
35 {
36 viewer = _viewer;
37 }
38
39 // This function is called before shutdown
40 virtual void shutdown()
41 {
42 }
43
44protected:
45 // Pointer to the main Viewer class
47};
48
49}
Definition MRViewerPlugin.h:27
virtual void init(Viewer *_viewer)
Definition MRViewerPlugin.h:34
virtual void shutdown()
Definition MRViewerPlugin.h:40
Viewer * viewer
Definition MRViewerPlugin.h:46
virtual ~ViewerPlugin()
Definition MRViewerPlugin.h:29
Definition MRCameraOrientationPlugin.h:8
MRVIEWER_API Viewer & getViewerInstance()
returns global instance of Viewer class
Definition Viewer.dox.py:1