-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvertex.h
52 lines (36 loc) · 1.09 KB
/
vertex.h
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
#ifndef VERTEX_H
#define VERTEX_H
#include <QList>
#include <QVector4D>
namespace jEle {
class Polygon;
class Vertex
{
public:
Vertex(double x, double y, double z);
Vertex(Vertex *o);
double x() const;
double y() const;
double z() const;
void setX(double x);
void setY(double y);
void setZ(double z);
void addPolygonBackReference(Polygon*);
QVector4D toQVector() const;
void setQVector(QVector4D);
Vertex operator+(const Vertex o) const;
Vertex operator-(const Vertex o) const;
Vertex operator/(const double r) const;
double operator*(const Vertex o) const;
Vertex operator*(const double f) const;
static Vertex crossProduct(const Vertex &a, const Vertex &b, const Vertex &c);
Vertex getNormalized() const;
Vertex getDistance(Vertex o);
void getArray(float *array) const;
Vertex getSyntheticNormal() const;
private:
double _x, _y, _z;
QList<Polygon*> referencedBy;
};
}
#endif // VERTEX_H