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.

ugeentitycube.h 990B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef UGEENTITYCUBE_H
  2. #define UGEENTITYCUBE_H
  3. #include "ugeentity.h"
  4. class UGEEntityCube : public UGEEntity
  5. {
  6. Q_OBJECT
  7. public:
  8. explicit UGEEntityCube(UGameEngine* engine, QObject *parent);
  9. explicit UGEEntityCube(UGameEngine* engine);
  10. double getSize() const;
  11. QVariant getTextureId() const;
  12. virtual void onDraw(AbstractRenderDevice* device);
  13. void onUpdate();
  14. virtual Vector3D getVectorNearestIntesection(const Vector3D &vector, const Vector3D &origin, bool* ok);
  15. signals:
  16. void sizeChanged();
  17. void sizeChanged(double);
  18. void textureChanged();
  19. void textureChanged(const QVariant& textureId);
  20. public slots:
  21. void setSize(double size);
  22. void increaseSize(double size);
  23. void setTextureId(const QVariant &textureId);
  24. protected:
  25. double _size;
  26. QVariant _textureId;
  27. QList<QList<TextureVector3D> > _facesTexture;
  28. QList<QList<ColorVector3D> > _facesColor;
  29. private:
  30. void init();
  31. };
  32. #endif // UGEENTITYCUBE_H