Vp::PreviewScene
#include "Viewport/scene/scenes/PreviewScene.h"
Inherits from Vp::Scene
Public Functions
Name | |
---|---|
PreviewScene(Viewport * viewport) | |
virtual void | init() override<br>Initialises the scene. |
Public Attributes
Name | |
---|---|
std::shared_ptr< OrbitCamera > | m_orbitCamera |
Additional inherited members
Public Functions inherited from Vp::Scene
Name | |
---|---|
Scene(Viewport * viewport) | |
virtual | ~Scene() =default |
template <typename T ,typename std::enable_if< std::is_base_of< Entity, T >::value, bool >::type =true> <br>std::weak_ptr< T > | addEntity(std::shared_ptr< T > entity)<br>Adds entity to the scene. |
void | addSelectionCallback(std::function< void(Entity *)> callback) |
virtual Ptr< SceneRenderTarget > | createRenderTarget(const RenderOptions & options)<br>Create and populates a SceneRenderTarget object with expected framebuffer objects for the scenes render pass. |
virtual void | draw(int width, int height, glm::mat4 view, glm::mat4 projection, SceneRenderTarget & renderTarget, const DisplayOptions & displayOptions)<br>Draw the scene using the provided view and projection matrices. |
virtual void | draw(int width, int height, SceneRenderTarget & renderTarget, const DisplayOptions & displayOptions)<br>Draw the scene using the scene's camera. |
const std::vector< std::shared_ptr< Entity > > & | getEntities() const |
virtual void | loadSettings(ViewportSettings & stg, bool scene, bool global) |
void | processInput(double dt, glm::vec2 mousePos, glm::ivec2 windowSize)<br>Update input logic. |
void | processSelection(SceneRenderTarget & renderTarget, glm::vec2 mousePos, glm::ivec2 windowSize)<br>Update selection logic. |
template <typename T ,typename std::enable_if< std::is_base_of< Entity, T >::value, bool >::type =true> <br>void | removeEntity(std::weak_ptr< T > entity)<br>Remove entity from the scene. |
virtual void | saveSettings(ViewportSettings & stg, bool scene, bool global) |
void | triggerSelectionCallbacks(Entity * entity) |
virtual void | update(double dt)<br>Update entity logic. |
Protected Functions inherited from Vp::Scene
Name | |
---|---|
void | renderSortedTransparentEntities(glm::mat4 view, glm::mat4 projection, const std::vector< Entity * > & entities) const |
void | sortExplicitlyOrderedTransparentEntities(std::vector< Entity * > & entities) |
void | sortUnorderedTransparentEntities(glm::mat4 view, std::vector< Entity * > & entities) |
Public Attributes inherited from Vp::Scene
Name | |
---|---|
std::shared_ptr< AbstractCamera > | m_camera |
std::shared_ptr< Lighting > | m_lighting |
std::shared_ptr< SelectStencil > | m_selectStencil |
Viewport * | m_viewport |
Protected Attributes inherited from Vp::Scene
Name | |
---|---|
std::vector< std::shared_ptr< Entity > > | m_entities |
std::vector< Entity * > | m_explicitTransparencyOrderEntitiesFirst |
std::vector< Entity * > | m_explicitTransparencyOrderEntitiesLast |
std::vector< Entity * > | m_highlightedEntities |
Entity * | m_selectedEntity |
std::vector< std::function< void(Entity *)> > | m_selectionCallbacks <br>Callbacks that get triggered on entity selection. |
std::vector< Entity * > | m_unorderedTransparentEntities |
Friends inherited from Vp::Scene
Name | |
---|---|
class | Viewport |
Public Functions Documentation
function PreviewScene
cpp
explicit PreviewScene(
Viewport * viewport
)
explicit PreviewScene(
Viewport * viewport
)
function init
cpp
virtual void init() override
virtual void init() override
Initialises the scene.
Reimplements: Vp::Scene::init
Should be called before any draw operations.
Public Attributes Documentation
variable m_orbitCamera
cpp
std::shared_ptr< OrbitCamera > m_orbitCamera;
std::shared_ptr< OrbitCamera > m_orbitCamera;
Updated on 2024-11-06 at 20:16:53 +0000