Open Source Tomb Raider Engine
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.

Sprite.h 726B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*!
  2. * \file include/Sprite.h
  3. * \brief World Sprite
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _SPRITE_H_
  8. #define _SPRITE_H_
  9. #include "math/math.h"
  10. class Sprite {
  11. public:
  12. Sprite(int _numVerts, vec3_t _vertex[4], vec2_t _texel[4], vec3_t _pos, vec_t _radius, int _texture);
  13. void display();
  14. private:
  15. int numVerts; //!< 4 == Quad, 3 == Triangle, rendered as triangles
  16. vec3_t vertex[4];
  17. vec2_t texel[4];
  18. vec3_t pos;
  19. vec_t radius; //!< \fixme yeah, I know (I don't? --xythobuz)
  20. int texture;
  21. };
  22. class SpriteSequence {
  23. public:
  24. ~SpriteSequence();
  25. void add(Sprite &s);
  26. unsigned int size();
  27. Sprite &get(unsigned int index);
  28. private:
  29. std::vector<Sprite *> sprites;
  30. };
  31. #endif