123456789101112131415161718192021222324252627282930313233343536 |
- //
- // Created by jovian on 18/07/17.
- //
- #ifndef TINYSHOOTER_VISUAL_H
- #define TINYSHOOTER_VISUAL_H
- #include <vector>
- #include "../Maths/b2_math.h"
- /* class Visual :
- * Describe something to show.
- */
- #define DEFAULT_ZOOM 100.0f // Default Universe/pixel scale
- class Visual {
- public :
- Visual(unsigned int imgId, const b2Vec2 &relPos, float angle, float scale = 1.0f);
- unsigned int getImgId() const;
- const b2Vec2 &getPos() const;
- float getAngle() const;
- float getScale() const;
- protected:
- const unsigned int m_imgId; // Id of SDL texture
- const b2Vec2 m_relPos; // From left top corner
- const float m_angle; // Angle of object
- const float m_scale; // Zoom multiplier
- };
- void clearVisuals(std::vector<Visual*> &scope);
- #endif //TINYSHOOTER_VISUAL_H
|