BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
triangle.h
Go to the documentation of this file.
1 // -*- Mode: C++; tab-width: 2; -*-
2 // vi: set ts=2:
3 //
4 
5 #ifndef BALL_STRUCTURE_TRIANGLE_H
6 #define BALL_STRUCTURE_TRIANGLE_H
7 
8 #ifndef BALL_STRUCTURE_GRAPHEDGE_H
10 #endif
11 
12 #ifndef BALL_STRUCTURE_GRAPHFACE_H
14 #endif
15 
16 #ifndef BALL_STRUCTURE_GRAPHVERTEX_H
18 #endif
19 
20 
21 namespace BALL
22 {
23 
24  class TriangleEdge;
25  class TrianglePoint;
26  class TriangulatedSurface;
27  class TriangulatedSphere;
28  class TriangulatedSES;
29  class TriangulatedSAS;
30  class SESTriangulator;
31  class SASTriangulator;
32 
33 
38  : public GraphTriangle< TrianglePoint,TriangleEdge,Triangle >
39  {
40 
41  public:
42 
55  friend class TriangleEdge;
56  friend class TrianglePoint;
57  friend class TriangulatedSurface;
58  friend class TriangulatedSphere;
59  friend class TriangulatedSES;
60  friend class TriangulatedSAS;
61  friend class SESTriangulator;
62  friend class SASTriangulator;
63 
65 
66 
69 
73  Triangle();
74 
80  Triangle(TrianglePoint* v1, TrianglePoint* v2, TrianglePoint* v3);
81 
89  Triangle(TriangleEdge* e1, TriangleEdge* e2, TriangleEdge* e3, bool flip_normal = false);
90 
98  Triangle(const Triangle& triangle, bool deep = false);
99 
103  virtual ~Triangle();
104 
106 
109 
117  void set(const Triangle& triangle, bool deep = false);
118 
124  Triangle& operator = (const Triangle& triangle);
125 
127 
130 
136  void setPoint(Position i, TrianglePoint* point)
137  throw(Exception::IndexOverflow);
138 
145  TrianglePoint* getPoint(Position i) const
146  throw(Exception::IndexOverflow);
147 
152  void remove(TriangleEdge* edge);
153 
155 
158 
162  virtual bool operator == (const Triangle&) const;
163 
167  virtual bool operator != (const Triangle&) const;
168 
172  virtual bool operator *= (const Triangle&) const;
173 
175 
176  };
177 
178 
182 
185  BALL_EXPORT std::ostream& operator << (std::ostream& s, const Triangle& triangle);
186 
188 
189 
190 } // namespace BALL
191 
192 
193 #endif // BALL_STRUCTURE_TRIANGLE_H
#define BALL_CREATE(name)
Definition: create.h:62
#define BALL_EXPORT
Definition: COMMON/global.h:50