Sprite.h
Go to the documentation of this file.
1 #ifndef B_SPRITE_H
2 #define B_SPRITE_H
3 
4 #include "Model.h"
5 
9 class Sprite : public Model
10 {
11 public:
12  /* Functions */
13 
16  Sprite(){}
17 
23  Sprite(MaterialPtr material, bool flipT, PropertiesPtr properties = nullptr);
24 
33  Sprite(ObjectManager *o, const std::string &textureFileName, const std::string &materialName, ShaderPtr shader, bool flipT, PropertiesPtr properties = nullptr);
34 
44  Sprite(ObjectManager *o, const std::string &name, const std::string &textureFileName, GLuint shaderMaxLights, bool variableNumberOfLights, bool flipT, PropertiesPtr properties = nullptr);
45 
48  virtual ~Sprite() { deleteModelGeometry(); }
49 
50 private:
51 
52  /* Functions */
53 
54  void createGeometry(bool flipT);
55 
56 };
57 
58 typedef std::shared_ptr< Sprite > SpritePtr;
59 
60 #endif /* defined(B_SPRITE_H) */
A 3d model that can be rendered to the screen.
Definition: Model.h:19
std::shared_ptr< Shader > ShaderPtr
Definition: Shader.h:211
std::shared_ptr< Properties > PropertiesPtr
Definition: Properties.h:179
Sprite()
Constructor.
Definition: Sprite.h:16
A 2d plane that can be rendered to the screen.
Definition: Sprite.h:9
virtual ~Sprite()
Virtual destructor.
Definition: Sprite.h:48
virtual void deleteModelGeometry()
Deletes all geometry of the model.
Definition: Model.h:168
This class manages all objects in a project and makes sure no object is created twice.
Definition: ObjectManager.h:32
std::shared_ptr< Material > MaterialPtr
Definition: Material.h:135
std::shared_ptr< Sprite > SpritePtr
Definition: Sprite.h:58