The class Qt_widget_Nef_3 uses the OpenGL interface of Qt to display a Nef_polyhedron_3. Its purpose is to provide an easy to use viewer for Nef_polyhedron_3. There are no means provided to enhance the functionality of the viewer.
In addition to the functions inherited from the Qt class OGLWidget via, Qt_widget_Nef_3 only has a single public constructor. For the usage of Qt_widget_Nef_3 see the example below.
#include <CGAL/IO/Qt_widget_Nef_3.h>
Qt_widget_Nef_3<Nef_polyhedron_3> W ( Nef_polyhedron_3 N); | |
Creates a widget W for displaying the 3D Nef polyhedron N.
|
CGAL::Nef_polyhedron_3<Traits>
File: demo/Nef_3/visualization_SNC.cpp
#include <CGAL/basic.h> #include <CGAL/Gmpz.h> #include <CGAL/Homogeneous.h> #include <CGAL/Nef_polyhedron_3.h> #include <CGAL/IO/Nef_polyhedron_iostream_3.h> #include <CGAL/IO/Qt_widget_Nef_3.h> #include <qapplication.h> typedef CGAL::Homogeneous<CGAL::Gmpz> Kernel; typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron_3; int main(int argc, char* argv[]) { Nef_polyhedron_3 N; std::cin >> N; QApplication a(argc, argv); CGAL::Qt_widget_Nef_3<Nef_polyhedron_3>* w = new CGAL::Qt_widget_Nef_3<Nef_polyhedron_3>(N); a.setMainWidget(w); w->show(); return a.exec(); }