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.

ugameengine.h 990B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef UGAMEENGINE_H
  2. #define UGAMEENGINE_H
  3. #include "abstractrenderdevice.h"
  4. #include "entities/ugeentity.h"
  5. #include "entitiesupdatethread.h"
  6. class EntitiesUpdateThread;
  7. class UGameEngine : public QObject
  8. {
  9. Q_OBJECT
  10. public:
  11. UGameEngine(AbstractRenderDevice* device);
  12. virtual ~UGameEngine();
  13. void update();
  14. void draw();
  15. const QList<UGEEntity*>& getEntities() const;
  16. UGEEntity *getEntity(int i) const;
  17. public slots:
  18. void addEntity(UGEEntity* entity);
  19. void lookAt(const Vector3D& eye, const Vector3D& center, const Vector3D& up = Vector3D(0.0, 1.0, 0.0));
  20. void setClearColor(const QColor &clearColor);
  21. void initialize(int fov, int width, int height);
  22. void resize(int width, int height);
  23. void loadTextureFromFile(const QVariant& id, const QString& filename);
  24. protected:
  25. QList<UGEEntity*> _entitites;
  26. AbstractRenderDevice* _device;
  27. QList<EntitiesUpdateThread*> _entitiesUpdateThreads;
  28. };
  29. #endif // UGAMEENGINE_H