Page 1 of 1
how to create new 3Dviewer in code?
Posted: Wed Jun 16, 2021 8:51 am
by xiaolu
hi there,
I want to write a plugin that
The function is: click this plugin to create a new 3d viewer,
and then display the new point cloud on this new 3dviewer.
I can't create a new 3d viewer with code, can you tell me some code.
thanks.
Re: how to create new 3Dviewer in code?
Posted: Wed Jun 16, 2021 10:58 pm
by daniel
You should look at how other plugins are doing it. For instance the
https://github.com/CloudCompare/CloudCo ... ard/qBroom
Re: how to create new 3Dviewer in code?
Posted: Thu Jun 17, 2021 2:28 am
by xiaolu
This plugin makes its own interface, and then links 3dviewer to its own interface.
I want to create a new 3dviwer to put in the main cc interface. Like this
- DeepinScreenshot_select-area_20210617100440.png (75.82 KiB) Viewed 1332 times
(I know cc comes with such a feature, but I want to implement it in my plugin so I can do it without changing anything inside cc.)
I have now implemented the following code to pop up a super large 3dviewer, but I can't link it with the cc main form.
Code: Select all
QWidget* viewWidget = nullptr;
ccGLWindow* view3D = nullptr;
m_app->createGLWindow(view3D,viewWidget);
viewWidget->showMaximized();
viewWidget->update();
Can you tell me how to link
thanks~
Re: how to create new 3Dviewer in code?
Posted: Thu Jun 17, 2021 11:24 am
by daniel
Well, I don't see any other choice than making the 'new3DView' method accessible to plugins (via the ccMainAppInterface).
And you'll have to make a PR on the master branch (since it impacts the main project).