-
Notifications
You must be signed in to change notification settings - Fork 0
/
objeto.h
43 lines (31 loc) · 962 Bytes
/
objeto.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
#include <QtOpenGL>
#include <QVector3D>
#include <QWidget>
#ifndef OBJETO_H
#define OBJETO_H
class Objeto : public QListWidgetItem
{
protected:
QVector3D Position;
QVector3D Rotation; // vector con el valor de rotacion en cada eje (en grados)
QVector3D RotVelocity; // velocidad con la que rotara en cada eje (en grados)
float colorR;
float colorG;
float colorB;
bool wired;
void Rotate(float deltaTime); // deltaTime es para calcular el valor que debe tener el angulo de rotacion nuevo
public:
Objeto();
virtual void draw(float dt);
void setRotation(QVector3D rot);
QVector3D getRotation() const;
void setRotVelocity(QVector3D vel);
QVector3D getRotVelocity() const;
void setPosition(QVector3D pos);
QVector3D getPosition() const;
bool getWired() const;
void setWired(bool w);
void operator+= (QVector3D);
void cambiarColor(const QColor &color);
};
#endif // OBJETO_H