codac 1.5.6
Loading...
Searching...
No Matches
codac_Polygon.h
1
11#ifndef __CODAC_POLYGON_H__
12#define __CODAC_POLYGON_H__
13
14#include <vector>
15#include "codac_Vector.h"
17#include "codac_ThickEdge.h"
18#include "codac_ThickPoint.h"
19
20namespace codac
21{
22 class Polygon
23 {
24 public:
25
28
29 Polygon();
30 Polygon(const Polygon& p);
31 Polygon(const std::vector<Vector>& v_floating_pts);
32 void set_empty();
33
37
38 int size() const;
39 int nb_edges() const;
40 int nb_vertices() const;
41 const std::vector<ThickEdge> edges() const;
42 const std::vector<Vector>& vertices() const;
43 const Vector& operator[](size_t vertex_id) const;
44 const IntervalVector box() const;
45 const ThickPoint center() const;
46 const Interval area() const;
47 double volume() const;
48
52
53 bool is_empty() const;
54 bool is_point() const;
55 bool is_segment() const;
56 bool operator==(const Polygon& p) const;
57 bool operator!=(const Polygon& p) const;
58
62
63 friend std::ostream& operator<<(std::ostream& str, const Polygon& p);
64
66
67
68 protected:
69
70 std::vector<Vector> m_v_floating_pts;
71 };
72}
73
74#endif
FixPoint of a separator The fixpoint of a separator is computed by calling the "::"separate function ...
Definition codac_capd_helpers.h:9