gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
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
10namespace gdk {
11 class entity;
12 class screen_camera;
13 class texture_camera;
14
16 class scene {
17 public:
19 virtual void add(const std::shared_ptr<const screen_camera> &pCamera) = 0;
21 virtual void remove(const std::shared_ptr<const screen_camera> &pCamera) = 0;
22
23 //TODO: why cant all cameras be treated the same? Look into whether or not this is necessary 2025_05_13
25 virtual void add(const std::shared_ptr<const texture_camera> &pCamera) = 0;
27 virtual void remove(const std::shared_ptr<const texture_camera> &pCamera) = 0;
28
30 virtual void add(const std::shared_ptr<const entity> &pEntity) = 0;
32 virtual void remove(const std::shared_ptr<const entity> &pEntity) = 0;
33
35 virtual void draw(const gdk::graphics_intvector2_type &aFrameBufferSize) const = 0;
36
37 virtual ~scene() = default;
38 };
39}
40
41#endif
42
represents an observable 3d object.
Definition entity.h:13
a 3d environment within which cameras draw entities
Definition scene.h:16
virtual void draw(const gdk::graphics_intvector2_type &aFrameBufferSize) const =0
draws the scene
virtual void add(const std::shared_ptr< const texture_camera > &pCamera)=0
add a texture camera to the scene
virtual void remove(const std::shared_ptr< const texture_camera > &pCamera)=0
remove a texture camera from the scene
virtual void add(const std::shared_ptr< const entity > &pEntity)=0
add an entity to the scene
virtual void remove(const std::shared_ptr< const entity > &pEntity)=0
remove an entity from the scene
virtual void add(const std::shared_ptr< const screen_camera > &pCamera)=0
add a screen camera to the scene
virtual void remove(const std::shared_ptr< const screen_camera > &pCamera)=0
remove a screen camera from the scene
Position, orientation and perspective from which entity(s) are drawn.
Definition screen_camera.h:15
texture camera renders to textures instead of the screen
Definition texture_camera.h:12