MeshLib
 
Loading...
Searching...
No Matches
Basing your application on MeshLib

First of all you should make main function like this

#include <MRMesh/MRLog.h>
int main( int argc, char** argv )
{
// Init the viewer
MR::Viewer::LaunchParams launchParams{ .argc = argc, .argv = argv };
launchParams.name = "Your app name";
MR::ViewerSetup viewerSetup;
viewerSetup.setupSettingsManager( MR::Viewer::instance(), launchParams.name );
return MR::launchDefaultViewer( launchParams, viewerSetup );
}
Definition MRSetupViewer.h:11
virtual void setupCommonPlugins(Viewer *) const
Setups custom plugins to viewer.
Definition MRSetupViewer.h:27
virtual void setupCommonModifiers(Viewer *) const
Setups modifiers to Menu plugin if it is present in viewer.
Definition MRSetupViewer.h:24
virtual MRVIEWER_API void setupBasePlugins(Viewer *) const
Setups Menu Save and Open plugins.
virtual MRVIEWER_API void setupConfiguration(Viewer *viewer) const
virtual MRVIEWER_API void setupSettingsManager(Viewer *viewer, const std::string &appName) const
Sets custom viewer settings manager to viewer.
static MRVIEWER_API void parseLaunchParams(LaunchParams &params)
static Viewer * instance()
Definition MRViewer.h:103
MRMESH_API void setupLoggerByDefault()
MRVIEWER_API int launchDefaultViewer(const Viewer::LaunchParams &params, const ViewerSetup &setup)
Definition MRViewer.h:47
int argc
Definition MRViewer.h:67

Then you should make your plugins, to find how have a look at State Plugins overview page