File: Scene_polygon_soup_item.h

package info (click to toggle)
cgal 4.5-2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 69,700 kB
  • ctags: 118,537
  • sloc: cpp: 571,870; ansic: 110,997; sh: 725; python: 92; makefile: 87
file content (55 lines) | stat: -rw-r--r-- 1,471 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef SCENE_POLYGON_SOUP_ITEM_H
#define SCENE_POLYGON_SOUP_ITEM_H

#include "Scene_polygon_soup_item_config.h"
#include "Scene_item_with_display_list.h"
#include <iostream>

#include "Polyhedron_type_fwd.h"

struct Polygon_soup;
class Scene_polyhedron_item;

class SCENE_POLYGON_SOUP_ITEM_EXPORT Scene_polygon_soup_item 
  : public Scene_item_with_display_list 
{
  Q_OBJECT
public:  
  Scene_polygon_soup_item();
  ~Scene_polygon_soup_item();

  Scene_polygon_soup_item* clone() const;
  bool load(std::istream& in);
  void load(Scene_polyhedron_item*);
  bool save(std::ostream& out) const;

  QString toolTip() const;

  // Indicate if rendering mode is supported
  virtual bool supportsRenderingMode(RenderingMode m) const { return (m!=Gouraud && m!=PointsPlusNormals && m!=Splatting); } // CHECK THIS!
  // OpenGL drawing in a display list
  void direct_draw() const;
  void draw_points() const;

  bool isFinite() const { return true; }
  bool isEmpty() const;
  Bbox bbox() const;

  void new_vertex(const double&, const double&, const double&);
  void new_triangle(const std::size_t, const std::size_t, const std::size_t);

public slots:
  void shuffle_orientations();
  bool orient();
  bool exportAsPolyhedron(Polyhedron*);
  void inside_out();

  void setDisplayNonManifoldEdges(const bool);
  bool displayNonManifoldEdges() const;

private:
  Polygon_soup* soup;
  bool oriented;
}; // end class Scene_polygon_soup_item

#endif // SCENE_POLYGON_SOUP_ITEM_H