2#include "MRViewerFwd.h"
38 std::vector<std::shared_ptr<MR::Object>> selectedObjs_;
53 bool meshChanged_{
false };
56 std::vector<boost::signals2::scoped_connection> meshChangedConnections_;
77 std::vector<boost::signals2::scoped_connection> connections_;
89 bool pointCloudChanged_{
false };
92 std::vector<boost::signals2::scoped_connection> pointCloudChangedConnections_;
104template<
typename ...Updates>
110 ( Updates::preDrawUpdate(), ... );
115 ( Updates::onPluginEnable_(), ... );
120 [[maybe_unused]]
int dummy;
121 ( void )( dummy = ... = ( Updates::onPluginDisable_(), 0 ) );
125 return ( Updates::shouldClose_() || ... );
Interface for automatically update StatePlugins internal data.
Definition MRStatePluginUpdate.h:15
Definition MRStatePluginUpdate.h:44
Definition MRStatePluginUpdate.h:83
Helper class to close a dialog-less plugin when the Esc key is pressed.
Definition MRStatePluginUpdate.h:97
Definition MRStatePluginUpdate.h:32
Definition MRStatePluginUpdate.h:63
Definition MRStatePluginUpdate.h:106
virtual void onPluginDisable_()
called when plugin stops
Definition MRStatePluginUpdate.h:24
virtual MRVIEWER_API bool shouldClose_() const override
called each frame, return true to close plugin
MRVIEWER_API bool shouldClose_() const override
called each frame, return true to close plugin
virtual MRVIEWER_API void onPluginEnable_() override
called when plugin started
virtual MRVIEWER_API void onPluginEnable_() override
called when plugin started
virtual MRVIEWER_API void onPluginDisable_() override
called when plugin stops
virtual ~IPluginUpdate()=default
virtual MRVIEWER_API void onPluginEnable_() override
called when plugin started
virtual MRVIEWER_API bool reactOnFaceSelectionChanges_() const
plugin can override it to make this helper class also react on face selections updates
Definition MRStatePluginUpdate.h:47
virtual MRVIEWER_API void onPluginDisable_() override
clears connections and UpdateFunc
virtual void preDrawUpdate()
called each frame in before drawDialog
Definition MRStatePluginUpdate.h:19
virtual void preDrawUpdate() override
Definition MRStatePluginUpdate.h:108
std::function< void()> UpdateFunc
Definition MRStatePluginUpdate.h:65
virtual MRVIEWER_API bool shouldClose_() const override
called each frame, return true to close plugin
virtual MRVIEWER_API void onPluginEnable_() override
sets dirty initially for first update, so no need to call UpdateFunc manually
virtual void onPluginDisable_() override
Definition MRStatePluginUpdate.h:117
virtual bool shouldClose_() const
called each frame, return true to close plugin
Definition MRStatePluginUpdate.h:26
virtual MRVIEWER_API void preDrawUpdate() override
called each frame in before drawDialog
virtual void onPluginEnable_()
called when plugin started
Definition MRStatePluginUpdate.h:22
virtual MRVIEWER_API bool shouldClose_() const override
called each frame, return true to close plugin
virtual void onPluginEnable_() override
Definition MRStatePluginUpdate.h:113
virtual MRVIEWER_API void onPluginDisable_() override
called when plugin stops
virtual bool shouldClose_() const override
Definition MRStatePluginUpdate.h:123
virtual MRVIEWER_API void onPluginDisable_() override
called when plugin stops
void setUpdateFunc(UpdateFunc func)
setup your update function that will be called if plugin is dirty in this frame
Definition MRStatePluginUpdate.h:67
only for bindings generation
Definition MRCameraOrientationPlugin.h:8