Visual.h 671 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // Created by jovian on 18/07/17.
  3. //
  4. #ifndef TINYSHOOTER_VISUAL_H
  5. #define TINYSHOOTER_VISUAL_H
  6. #include <box2d/box2d.h>
  7. #include <vector>
  8. /* class Visual :
  9. * Describe something to show.
  10. */
  11. #define DEFAULT_ZOOM 100.0f // Default Box2D/pixel scale
  12. class Visual {
  13. public :
  14. Visual(unsigned int imgId, const b2Vec2 &relPos, float angle);
  15. unsigned int getImgId() const;
  16. const b2Vec2 &getPos() const;
  17. float getAngle() const;
  18. protected:
  19. unsigned int m_imgId; // Id of SDL texture
  20. b2Vec2 m_relPos; // From left top corner
  21. float m_angle; // Angle of object
  22. };
  23. void clearVisuals(std::vector<Visual*> &scope);
  24. #endif //TINYSHOOTER_VISUAL_H