igraphic 0.2.0
Contrats graphiques chargeables : IGraphic2Module / IGraphic3Module
Loading...
Searching...
No Matches
ISprite.hpp
Go to the documentation of this file.
1
11#ifndef ISPRITE_HPP_
12 #define ISPRITE_HPP_
13 #include "Type.hpp"
14 #include "../window/IWindow.hpp"
15
16namespace graphic {
17
22 class ISprite {
23
24 public:
25
29 virtual ~ISprite() = default;
30
36 virtual bool isReady() const = 0;
37
43 virtual Rect<float> getBounds() const = 0;
44
50 virtual void setCrop(Rect<float> rect) = 0;
51
57 virtual Vector2f getPosition() const = 0;
58
64 virtual void setPosition(Vector2f position) = 0;
65
71 virtual float getRotation() const = 0;
72
79 virtual void setRotation(float angle, bool isRad = false) = 0;
80
86 virtual Vector2f getSize() const = 0;
87
93 virtual void setSize(Vector2f size) = 0;
94
95 };
96
97} // namespace graphic3
98
101#endif /* !ISPRITE_HPP_ */
Sprite interface.
Definition ISprite.hpp:22
virtual void setCrop(Rect< float > rect)=0
Crop the sprite with a rectangle.
virtual void setSize(Vector2f size)=0
Set the Sprite size.
virtual void setRotation(float angle, bool isRad=false)=0
Set the Rotation object.
virtual ~ISprite()=default
Destroy the ISprite object.
virtual float getRotation() const =0
Get the Rotation object.
virtual bool isReady() const =0
notice if the sprite is ready
virtual Vector2f getSize() const =0
Get the Sprite size.
virtual Vector2f getPosition() const =0
Get the Position object.
virtual Rect< float > getBounds() const =0
give the bounds of the sprite
virtual void setPosition(Vector2f position)=0
Set the Position object.
Definition IGamepad.hpp:14