35 const std::vector<GraphicsObject *>
getObjects()
const;
52 void addObjects(
const std::vector<GraphicsObject *> &toadd);
68 void draw(uint32_t time)
override;
72 static std::string unsafeRandomHash(
size_t length);
73 const std::string classHash = GraphicsScene::unsafeRandomHash(32);
74 std::vector<GraphicsObject *> objects;
void addObject(GraphicsObject *object)
Add an object to the scene. *** Once added, the object is bound to the scene and it will take care of...
Definition: GraphicsScene.cpp:23
void show()
Definition: GraphicsScene.cpp:62
A simple interface for all the graphic objects that are supposed to be drawn.
Definition: GraphicsObject.h:17
The GraphicsObject base class.
virtual ~GraphicsScene()
Definition: GraphicsScene.cpp:9
const std::vector< GraphicsObject * > getObjects() const
Definition: GraphicsScene.cpp:18
void removeObject(GraphicsObject *toremove)
Removes an object from the scene. *** You take ownership of the object back, so the scene won't delet...
Definition: GraphicsScene.cpp:38
void clearObjects()
Removes all the objects from the scene, taking ownership back on them.
Definition: GraphicsScene.cpp:48
The scene manager controls which scene is currently displayed, in addition to enumerating the scenes ...
Definition: SceneManager.h:22
GraphicsScene operator=(const GraphicsScene ©)=delete
void addObjects(GraphicsObject **toadd, size_t number)
Add an array of objects to the scene.
Definition: GraphicsScene.cpp:28
void draw(uint32_t time) override
The draw method. It will be called once per frame for each object in a scene.
Definition: GraphicsScene.cpp:53
The Scene object is a base class to construct a Scene upon. The scene is basically a view that can be...
Definition: GraphicsScene.h:27
GraphicsScene()
Definition: GraphicsScene.cpp:4