forked from picciau-g/superfacets-2d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVertex2D.cpp
executable file
·69 lines (56 loc) · 1.08 KB
/
Vertex2D.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#include "Vertex2D.h"
/**
* @brief Vertex2D::Vertex2D class constructor
*/
Vertex2D::Vertex2D() {
this->x = 0;
this->y = 0;
this->vtstar = -1;
}
/**
* @brief Vertex2D::Vertex2D class constructor
* @param orig origin
*/
Vertex2D::Vertex2D(const Vertex2D& orig) {
this->x = orig.x;
this->y = orig.y;
this->vtstar = orig.vtstar;
}
/**
* @brief Vertex2D::Vertex2D class constructor
* @param x x coordinate
* @param y y coordinate
*/
Vertex2D::Vertex2D(double x, double y){
this->x = x;
this->y = y;
this->vtstar = -1;
}
Vertex2D::~Vertex2D() {
}
double Vertex2D::getX(){
return this->x;
}
double Vertex2D::getY(){
return this->y;
}
void Vertex2D::setX(double x){
this->x = x;
}
void Vertex2D::setY(double y){
this->y = y;
}
int Vertex2D::VTstar()
{
return this->vtstar;
}
void Vertex2D::VTstar(int vtstar)
{
this->vtstar = vtstar;
}
bool operator== (const Vertex2D &p, const Vertex2D &q) {
return ((p.x == q.x) && (p.y == q.y));
}
bool operator !=(const Vertex2D& p, const Vertex2D& q) {
return !(p == q);
}