mirror of https://github.com/CGAL/cgal
Update example plugins
This commit is contained in:
parent
f85a6a52aa
commit
c60acf58c4
|
|
@ -8,7 +8,8 @@
|
|||
#include "CGAL/Three/Scene_group_item.h"
|
||||
#include "Scene_plane_item.h"
|
||||
|
||||
//This plugin crates an action in Operations that displays "Hello World" in the 'console' dockwidet.
|
||||
//This plugin crates an action in Operations that displays the name of the selected item,
|
||||
//adds a scene_plane_item to the scene, and adds the selected item and the plane to a new group.
|
||||
class BasicItemPlugin :
|
||||
public QObject,
|
||||
public CGAL::Three::Polyhedron_demo_plugin_interface
|
||||
|
|
@ -36,10 +37,10 @@ public:
|
|||
this->messageInterface = mi;
|
||||
//get the references
|
||||
this->scene = sc;
|
||||
this->mw = mainWindow;
|
||||
this->mw = mw;
|
||||
|
||||
//creates the action
|
||||
QAction *actionHelloWorld= new QAction(QString("Hello World"), mw);
|
||||
QAction *actionHelloWorld= new QAction(QString("Create a group"), mw);
|
||||
//specifies the subMenu
|
||||
actionHelloWorld->setProperty("submenuName", "Basic");
|
||||
//links the action
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Change the value of EXAMPLE_COMPLEXITY in the first line to change the behavior
|
|||
- 1 : pops-up a simple dialog asking to enter an integer , then prints it in the Info and console widgets
|
||||
- 2 : pops-up a little more elaborated dialog asking to enter an integer , then prints it in the Info and console widgets if it was indeed an integer, else pops-up an error message box.
|
||||
*/
|
||||
#define EXAMPLE_COMPLEXITY 2
|
||||
#define EXAMPLE_COMPLEXITY 0
|
||||
#include "ui_Basic_dialog_plugin.h"
|
||||
//! [headers_plugin]
|
||||
#include <CGAL/Three/Polyhedron_demo_plugin_interface.h>
|
||||
|
|
@ -33,7 +33,7 @@ public:
|
|||
//! [dialog_plugin]
|
||||
//! [opening_plugin]
|
||||
|
||||
//This plugin crates an action in Operations that displays "Hello World" in the 'console' dockwidet.
|
||||
//This plugin creates an action in Operations depending on EXAMPLE_COMPLEXITY.
|
||||
class BasicPlugin :
|
||||
public QObject,
|
||||
public CGAL::Three::Polyhedron_demo_plugin_interface
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public:
|
|||
}
|
||||
};
|
||||
//! [dock]
|
||||
//This plugin crates an action in Operations that displays "Hello World" in the 'console' dockwidet.
|
||||
//This plugin crates an action in Operations that creates a DOckWidget to display a number in the 'console' dockwidet.
|
||||
class BasicPlugin :
|
||||
public QObject,
|
||||
public CGAL::Three::Polyhedron_demo_plugin_helper
|
||||
|
|
@ -46,10 +46,10 @@ public:
|
|||
this->messageInterface = mi;
|
||||
//get the references
|
||||
this->scene = sc;
|
||||
this->mw = mainWindow;
|
||||
this->mw = mw;
|
||||
|
||||
//creates the action
|
||||
QAction *actionHelloWorld= new QAction(QString("Hello World"), mw);
|
||||
QAction *actionHelloWorld= new QAction(QString("Open Dock Widget"), mw);
|
||||
//specifies the subMenu
|
||||
actionHelloWorld->setProperty("submenuName", "Basic");
|
||||
//links the action
|
||||
|
|
|
|||
|
|
@ -63,9 +63,6 @@ Scene_triangle_item::Scene_triangle_item(double ax,double ay, double az,
|
|||
double cx,double cy, double cz)
|
||||
: CGAL::Three::Scene_item(1,1)
|
||||
{
|
||||
|
||||
//Color is uniform, no need for a buffer. Changing the color will not re-compute the data
|
||||
is_monochrome = true;
|
||||
nb_pos = 0;
|
||||
are_buffers_filled = false;
|
||||
computeElements(ax, ay, az,
|
||||
|
|
@ -200,6 +197,7 @@ public Q_SLOTS:
|
|||
triangle = new Scene_triangle_item(0, 0, 0,
|
||||
1, 0, 0,
|
||||
0.5, 0.5, 0);
|
||||
triangle->setName(QString("Basic triangle"));
|
||||
scene->addItem(triangle);
|
||||
}
|
||||
private:
|
||||
|
|
|
|||
Loading…
Reference in New Issue