Flow123d  jenkins-Flow123d-windows32-release-multijob-51
point.h
Go to the documentation of this file.
1 #ifndef pointH
2 #define pointH
3 
4 #include <iostream>
5 
6 #include "myvector.h"
7 
8 class TVector;
9 
10 class TPoint {
11 private:
12  static int numberInstance;
13  int id;
14 
15  double x;
16  double y;
17  double z;
18 
19  int generateId();
20 
21 public:
22  TPoint();
23  TPoint(double, double, double);
24  TPoint(const TPoint&);
25  ~TPoint();
26 
29  bool operator ==(TPoint*);
30 
31  TPoint & operator =(const TPoint&);
32  TPoint & operator =(const TVector&);
33  TVector operator -(const TPoint&) const;
34  TPoint operator +(const TPoint&) const;
35  bool operator ==(const TPoint&) const;
36  friend std::ostream & operator <<(std::ostream&, const TPoint&);
37 
38  void SetCoord(double, double, double);
39  void SetCoord(const TVector&);
40 
41  double X() const;
42  double Y() const;
43  double Z() const;
44 
45  double Get(int) const;
46 
47  static int getNumInstances() {
49  }
50 };
51 
52 #endif
double y
Definition: point.h:16
friend std::ostream & operator<<(std::ostream &, const TPoint &)
Definition: point.cpp:117
static int getNumInstances()
Definition: point.h:47
TPoint * operator+(TPoint *)
TPoint * operator=(TPoint *)
double X() const
Definition: point.cpp:91
Definition: point.h:10
int generateId()
Definition: point.cpp:11
double Y() const
Definition: point.cpp:95
void SetCoord(double, double, double)
Definition: point.cpp:79
TVector operator-(const TPoint &) const
Definition: point.cpp:65
double Z() const
Definition: point.cpp:99
double x
Definition: point.h:15
bool operator==(TPoint *)
TPoint()
Definition: point.cpp:15
double Get(int) const
Definition: point.cpp:103
static int numberInstance
Definition: point.h:12
double z
Definition: point.h:17
int id
Definition: point.h:13
~TPoint()
Definition: point.cpp:39