#include <MRViewer/MRStatePluginUpdate.h>
Public Types | |
| using | UpdateFunc = std::function<void()> |
Public Member Functions | |
| void | setUpdateFunc (UpdateFunc func) |
| setup your update function that will be called if plugin is dirty in this frame | |
| virtual void | preDrawUpdate () override |
| called each frame in before drawDialog | |
| Public Member Functions inherited from MR::IPluginUpdate | |
| virtual | ~IPluginUpdate ()=default |
Protected Member Functions | |
| virtual void | onPluginEnable_ () override |
| sets dirty initially for first update, so no need to call UpdateFunc manually | |
| virtual void | onPluginDisable_ () override |
| clears connections and UpdateFunc | |
| Protected Member Functions inherited from MR::IPluginUpdate | |
| virtual bool | shouldClose_ () const |
| called each frame, return true to close plugin | |
Helper class to update plugin if any of active object meshes or selected faces have changed note that events only marks plugin dirty and update happens before drawDialog function inherit your plugin from it