-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvector3d.h
More file actions
30 lines (26 loc) · 772 Bytes
/
vector3d.h
File metadata and controls
30 lines (26 loc) · 772 Bytes
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
#ifndef VECTOR3D_H
#define VECTOR3D_H
#include<Qt3DCore>
#include<Qt3DRender>
#include<Qt3DExtras>
using namespace Qt3DCore;
using namespace Qt3DRender;
using namespace Qt3DExtras;
enum{AXIS=1,FLIP=2};
class Vector3D:public QEntity{
Q_OBJECT
static const char tailLength=8;
static const char headLength=2;
const bool flipped;
Qt3DCore::QTransform
*transform=new Qt3DCore::QTransform(this),//handles rotations
*tailTransform=new Qt3DCore::QTransform(),//handles head translation
*headTransform=new Qt3DCore::QTransform();//handles tail translation
public:
Vector3D(QColor color,unsigned char type=0,QNode*parent=0);
public slots:
void setDirection(float x=0,float y=0,float z=0);
void setDistance(float distance=0);
void setLength(float length=1);
};
#endif