mirror of https://github.com/CGAL/cgal
64 lines
1.8 KiB
C++
64 lines
1.8 KiB
C++
#ifndef CGAL_SCENE_SURFACE_MESH_ITEM_H
|
|
#define CGAL_SCENE_SURFACE_MESH_ITEM_H
|
|
//Defines the precision of the positions (for performance/precision sake)
|
|
#define CGAL_GL_DATA GL_FLOAT
|
|
#define cgal_gl_data float
|
|
#define CGAL_IS_FLOAT 1
|
|
|
|
#include "Scene_surface_mesh_item_config.h"
|
|
#include <CGAL/Three/Scene_item.h>
|
|
#include <CGAL/Three/Viewer_interface.h>
|
|
#include <vector>
|
|
|
|
#include <boost/scoped_ptr.hpp>
|
|
#include <boost/array.hpp>
|
|
|
|
#include <CGAL/Surface_mesh/Surface_mesh_fwd.h>
|
|
#include <CGAL/boost/graph/graph_traits_Surface_mesh.h>
|
|
|
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
|
|
|
|
|
struct Scene_surface_mesh_item_priv;
|
|
|
|
class SCENE_SURFACE_MESH_ITEM_EXPORT Scene_surface_mesh_item
|
|
: public CGAL::Three::Scene_item
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel;
|
|
typedef Kernel::Point_3 Point;
|
|
typedef CGAL::Surface_mesh<Point> SMesh;
|
|
typedef boost::graph_traits<SMesh>::face_descriptor face_descriptor;
|
|
|
|
// Takes ownership of the argument.
|
|
Scene_surface_mesh_item(SMesh*);
|
|
|
|
Scene_surface_mesh_item(const Scene_surface_mesh_item& other);
|
|
|
|
~Scene_surface_mesh_item();
|
|
|
|
Scene_surface_mesh_item* clone() const;
|
|
void draw(CGAL::Three::Viewer_interface *) const;
|
|
void drawEdges(CGAL::Three::Viewer_interface *) const;
|
|
void drawPoints(CGAL::Three::Viewer_interface *) const;
|
|
|
|
bool supportsRenderingMode(RenderingMode m) const;
|
|
bool isFinite() const { return true; }
|
|
bool isEmpty() const;
|
|
Bbox bbox() const;
|
|
QString toolTip() const;
|
|
|
|
SMesh* polyhedron();
|
|
const SMesh* polyhedron() const;
|
|
void compute_bbox()const;
|
|
public Q_SLOTS:
|
|
virtual void selection_changed(bool);
|
|
protected:
|
|
friend struct Scene_surface_mesh_item_priv;
|
|
Scene_surface_mesh_item_priv* d;
|
|
};
|
|
|
|
|
|
#endif /* CGAL_SCENE_SURFACE_MESH_ITEM_H */
|