Acoustic FDTD Solver
Polygon.hpp
Go to the documentation of this file.
1 #ifndef POLYGON_HPP
2 #define POLYGON_HPP
3 
4 #include "Shape.hpp"
5 #include "CartPosition.hpp"
6 
7 
8 bool pair_compare_2nd(std::pair<double,double> a, std::pair<double,double> b);
9 
10 class Polygon:public Shape {
11  double** vertex;
12  unsigned int nPoints;
14 public:
17 public:
18  Polygon();
22  Polygon(double coord[][2], unsigned int m);
23 
27  Polygon(const Polygon &poly);
28 
32  Polygon & operator=(const Polygon &poly);
33 
34  virtual CartPosition getUpper() const;
35  virtual CartPosition getLower() const;
36  virtual double getXLength() const;
37  virtual double getYLength() const;
38  virtual double getZLength() const;
39  virtual double getLargestLength() const;
40  virtual unsigned getType() const;
41  virtual Shape *clone() const;
42  std::vector<std::vector<unsigned> > getCoordinateIndex(const Grid &grid) const;
43  bool insert(double a[2]);
44 
45  ~Polygon();
46 
47 };
48 
49 #endif