Acoustic FDTD Solver
CartPosition.hpp
Go to the documentation of this file.
1 #ifndef CARTPOSITION_HPP
2 #define CARTPOSITION_HPP
3 
4 #include "constant.hpp"
5 
6 class CartPosition;
7 
8 #include "SpherePosition.hpp"
9 
13 class CartPosition {
14 public:
15  double x;
16  double y;
17  double z;
19  CartPosition();
23  CartPosition(double c);
29  CartPosition(double b,double c);
30 
37  CartPosition(double a,double b,double c);
38  CartPosition(const CartPosition &b);
39  bool operator>(const CartPosition &b) const ;
40  bool operator<(const CartPosition &b) const ;
41  bool operator==(const CartPosition &b) const;
42  bool operator!=(const CartPosition &b) const;
45  CartPosition &operator/(const double);
46  friend std::ostream &operator<<(std::ostream &stream, const CartPosition &b);
52  double getDistance(const CartPosition &b) const;
60  double getAngleInYZPlane(const CartPosition &center) const;
64  SpherePosition toSphere() const;
65  double dotProduct(const CartPosition &b) const;
66  double getNorm() const;
67  void print() const;
68 };
69 
70 
71 #endif