Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
SceneEditor.hpp
1#pragma once
2#include "EditorRenderer.hpp"
3#include "Application.hpp"
4#include "input/ControllableCamera.hpp"
5
6#include "Common.hpp"
7
12class SceneEditor final : public CameraApp {
13
14public:
19 explicit SceneEditor(RenderingConfig & config, Window & window);
20
22 void draw() override;
23
25 void update() override;
26
27 void physics(double fullTime, double frameTime) override;
28
31 void resize() override;
32
33private:
34
38 void setScene(const std::shared_ptr<Scene> & scene);
39
44
45 std::vector<std::shared_ptr<Scene>> _scenes;
46 std::vector<std::string> _sceneNames;
47 int _selectedObject = -1;
48
49 size_t _currentScene = 0;
50 bool _paused = false;
51};
double frameTime()
Definition: Application.cpp:87
Window & window()
Definition: Application.cpp:95
Application with an interactive camera.
Definition: Application.hpp:89
Render the scene in the editor.
Definition: EditorRenderer.hpp:15
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Configuration containing parameters for windows and renderers.
Definition: Config.hpp:113
Scene editor interface.
Definition: SceneEditor.hpp:12
void resize() override
Definition: SceneEditor.cpp:214
EditorRenderer _renderer
Scene renderer.
Definition: SceneEditor.hpp:40
Program * _passthrough
Passthrough program.
Definition: SceneEditor.hpp:43
size_t _currentScene
Currently selected scene.
Definition: SceneEditor.hpp:49
bool _paused
Pause the scene animations.
Definition: SceneEditor.hpp:50
void draw() override
Definition: SceneEditor.cpp:53
void physics(double fullTime, double frameTime) override
Definition: SceneEditor.cpp:208
void update() override
Definition: SceneEditor.cpp:73
std::vector< std::shared_ptr< Scene > > _scenes
The existing scenes.
Definition: SceneEditor.hpp:45
void setScene(const std::shared_ptr< Scene > &scene)
Definition: SceneEditor.cpp:30
Texture _sceneColor
Scene texture.
Definition: SceneEditor.hpp:41
Texture _sceneDepth
Scene depth texture.
Definition: SceneEditor.hpp:42
int _selectedObject
Currently selected object.
Definition: SceneEditor.hpp:47
std::vector< std::string > _sceneNames
The associated scene names.
Definition: SceneEditor.hpp:46
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12
Represent an OS window and its associated rendering context.
Definition: Window.hpp:14