gdk-graphics  1b6d84e044c2c953fd7c9501e628a67e80f4da0d
scene.h
1 // © Joseph Cameron - All Rights Reserved
2 
3 #ifndef GDK_GFX_SCENE_H
4 #define GDK_GFX_SCENE_H
5 
6 #include <gdk/graphics_types.h>
7 
8 #include <memory>
9 
10 namespace gdk
11 {
12  class entity;
13  class entity_owner;
14  class screen_camera;
15  class texture_camera;
16 
18  class scene
19  {
20  public:
22  void add(const entity_owner &rOwner);
24  void remove(const entity_owner &rOwner);
25 
27  virtual void add(const std::shared_ptr<const screen_camera> &pCamera) = 0;
29  virtual void remove(const std::shared_ptr<const screen_camera> &pCamera) = 0;
30 
32  virtual void add(const std::shared_ptr<const texture_camera> &pCamera) = 0;
34  virtual void remove(const std::shared_ptr<const texture_camera> &pCamera) = 0;
35 
37  virtual void add(const std::shared_ptr<const entity> &pEntity) = 0;
39  virtual void remove(const std::shared_ptr<const entity> &pEntity) = 0;
40 
42  virtual void draw(const gdk::graphics_intvector2_type &aFrameBufferSize) const = 0;
43 
44  virtual ~scene() = default;
45  };
46 }
47 
48 #endif
49 
Definition: camera.h:9
a 3d environment within which cameras draw entities
Definition: scene.h:18
virtual void draw(const gdk::graphics_intvector2_type &aFrameBufferSize) const =0
draws the scene
void add(const entity_owner &rOwner)
add all an owner&#39;s entities to the scene
library facing interface for user-defined types that own entities
Definition: entity_owner.h:21