openPSTD  2.0
Open source simulation for sound propagation in urban environments
Geometry.h
1 // This file is part of openPSTD. //
3 // //
4 // openPSTD is free software: you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation, either version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // openPSTD is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with openPSTD. If not, see <http://www.gnu.org/licenses/>. //
16 // //
18 
20 //
21 // Date: 17-9-15
22 //
23 //
24 // Authors: omar
25 //
26 //
27 // Purpose:
28 //
29 //
31 #ifndef OPENPSTD_GEOMETRY_H
32 #define OPENPSTD_GEOMETRY_H
33 
34 #include <ostream>
35 #include <vector>
36 
37 namespace OpenPSTD {
38  namespace Kernel {
43  class Point {
44  public:
45  int x, y, z;
46  std::vector<int> array;
47 
48  Point() : x(0), y(0), z(0) { };
49 
54  Point(int x, int y, int z = 0);
55 
59  friend Point operator+(Point a, Point b);
60 
65  friend Point operator-(Point a, Point b);
66  };
67 
71  std::ostream &operator<<(std::ostream &str, Point const &v);
72  }
73 }
74 #endif //OPENPSTD_GEOMETRY_H
This is the general namespace of the OpenPSTD application.
Definition: Boundary.cpp:33
friend Point operator+(Point a, Point b)
Addition operator for points.
Definition: Geometry.cpp:16
friend Point operator-(Point a, Point b)
Subtraction operator for points.
Definition: Geometry.cpp:21
The points of the grid, represented by 2D integer vectors.
Definition: Geometry.h:43