gdk-graphics 0a0aef92e917cfbac53dffbc32c295e4de914093
Loading...
Searching...
No Matches
scene.h
1// © Joseph Cameron - MIT License
2
3#ifndef GDK_GRAPHICS_SCENE_H
4#define GDK_GRAPHICS_SCENE_H
5
6#include <gdk/graphics/color.h>
7#include <gdk/graphics/types.h>
8
9#include <memory>
10#include <string_view>
11
12namespace gdk::graphics {
13 class entity;
14 class screen_camera;
15 class texture_camera;
16
18 class scene {
19 public:
29 virtual void add(const std::shared_ptr<const screen_camera> &pCamera) = 0;
30 virtual void remove(const std::shared_ptr<const screen_camera> &pCamera) = 0;
31
32 virtual void add(const std::shared_ptr<const texture_camera> &pCamera) = 0;
33 virtual void remove(const std::shared_ptr<const texture_camera> &pCamera) = 0;
34
35 virtual void add(const std::shared_ptr<const entity> &pEntity) = 0;
36 virtual void remove(const std::shared_ptr<const entity> &pEntity) = 0;
38
40 virtual void draw(const gdk::graphics::intvector2_type &aFrameBufferSize) const = 0;
41
53 virtual void set_float(const std::string_view aName, float aValue) = 0;
54 virtual void set_vector2(const std::string_view aName, vector2_type aValue) = 0;
55 virtual void set_vector3(const std::string_view aName, vector3_type aValue) = 0;
56 virtual void set_vector4(const std::string_view aName, vector4_type aValue) = 0;
57 virtual void set_vector4(const std::string_view aName, const color &aValue) = 0;
58 virtual void set_integer(const std::string_view aName, int aValue) = 0;
60
61 virtual ~scene() = default;
62 };
63}
64
65#endif
66
represents an observable 3d object.
Definition entity.h:13
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
Position, orientation and perspective from which entity(s) are drawn.
Definition screen_camera.h:12
texture camera renders to textures instead of the screen
Definition texture_camera.h:12
Represents a 4 channel color: {Red, Green, Blue, Alpha}.
Definition color.h:10