You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ugeentity.h 927B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef UGEENTITY_H
  2. #define UGEENTITY_H
  3. #include <QObject>
  4. #include <QPoint>
  5. #include <QSharedPointer>
  6. #include "vector3d.h"
  7. #include "abstractrenderdevice.h"
  8. class UGEEntity : public QObject
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit UGEEntity(QObject *parent = 0);
  13. Vector3D getPosition() const;
  14. void setPosition(const Vector3D& position);
  15. void move(const Vector3D& move);
  16. Vector3D getSpeed() const;
  17. void setSpeed(const Vector3D& speed);
  18. void accelerate(const Vector3D& speed);
  19. Vector3D getRotation() const;
  20. void setRotation(const Vector3D& rotation);
  21. void rotate(const Vector3D& rotation);
  22. Vector3D getScale() const;
  23. void setScale(const Vector3D& scale);
  24. void scale(const Vector3D& scale);
  25. virtual void draw(AbstractRenderDevice* device) = 0;
  26. private:
  27. Vector3D _position;
  28. Vector3D _speed;
  29. Vector3D _rotation;
  30. Vector3D _scale;
  31. };
  32. #endif // UGEENTITY_H