src/vertex.h

changeset 21
0133e565e072
parent 20
cef43609a374
child 22
6da867fa5429
equal deleted inserted replaced
20:cef43609a374 21:0133e565e072
19 #pragma once 19 #pragma once
20 #include <functional> 20 #include <functional>
21 #include <QVector3D> 21 #include <QVector3D>
22 #include "basics.h" 22 #include "basics.h"
23 #include "maths.h" 23 #include "maths.h"
24 #include "matrix.h"
24 25
25 struct Point3D 26 struct Point3D
26 { 27 {
27 double x, y, z; 28 double x, y, z;
28 using CoordinateType = decltype(x); 29 using CoordinateType = decltype(x);
32 operator QVariant() const; 33 operator QVariant() const;
33 }; 34 };
34 35
35 namespace math 36 namespace math
36 { 37 {
37 Point3D transform(const Point3D point, const GLRotationMatrix& matrix); 38 Point3D transform(const Point3D& point, const Matrix4x4& matrix);
38 qreal distance(const Point3D& one, const Point3D& other); 39 qreal distance(const Point3D& one, const Point3D& other);
39 } 40 }
40 41
41 Point3D& operator+=(Point3D &point, const QVector3D& other); 42 Point3D& operator+=(Point3D &point, const QVector3D& other);
42 Point3D operator+(Point3D point, const QVector3D& other); 43 Point3D operator+(Point3D point, const QVector3D& other);

mercurial