Voltray Engine Docs
Loading...
Searching...
No Matches
Editor::Components::ViewportScene Class Reference

Manages scene initialization and lifecycle for the viewport. More...

#include <ViewportScene.h>

Public Member Functions

 ViewportScene ()
 
 ~ViewportScene ()
 
void Initialize ()
 Initialize the scene with demo objects.
 
::SceneGetScene ()
 Get the scene instance.
 
::BaseCameraGetCamera ()
 Get the camera instance.
 
::RendererGetRenderer ()
 Get the renderer instance.
 
bool IsInitialized () const
 Check if scene is properly initialized.
 
void UpdateCameraAspect (int width, int height)
 Update camera aspect ratio.
 
void SetCameraViewportBounds (float x, float y, float width, float height)
 Set camera viewport bounds for input handling.
 
void SwitchCamera (CameraType type)
 Switch to a different camera type.
 
void UpdateCameraSettings (float fov, float orthoSize, float nearPlane, float farPlane)
 Update camera settings.
 
CameraType GetCurrentCameraType () const
 Get current camera type.
 

Detailed Description

Manages scene initialization and lifecycle for the viewport.

Constructor & Destructor Documentation

◆ ViewportScene()

Editor::Components::ViewportScene::ViewportScene ( )

◆ ~ViewportScene()

Editor::Components::ViewportScene::~ViewportScene ( )

Member Function Documentation

◆ GetCamera()

::BaseCamera & Editor::Components::ViewportScene::GetCamera ( )
inline

Get the camera instance.

Returns
Reference to the camera

◆ GetCurrentCameraType()

CameraType Editor::Components::ViewportScene::GetCurrentCameraType ( ) const

Get current camera type.

Returns
Current camera type

◆ GetRenderer()

::Renderer & Editor::Components::ViewportScene::GetRenderer ( )
inline

Get the renderer instance.

Returns
Reference to the renderer

◆ GetScene()

::Scene & Editor::Components::ViewportScene::GetScene ( )
inline

Get the scene instance.

Returns
Reference to the scene

◆ Initialize()

void Editor::Components::ViewportScene::Initialize ( )

Initialize the scene with demo objects.

◆ IsInitialized()

bool Editor::Components::ViewportScene::IsInitialized ( ) const

Check if scene is properly initialized.

Returns
True if all components are created

◆ SetCameraViewportBounds()

void Editor::Components::ViewportScene::SetCameraViewportBounds ( float  x,
float  y,
float  width,
float  height 
)

Set camera viewport bounds for input handling.

Parameters
xX position
yY position
widthWidth
heightHeight

◆ SwitchCamera()

void Editor::Components::ViewportScene::SwitchCamera ( CameraType  type)

Switch to a different camera type.

Parameters
typeThe camera type to switch to

◆ UpdateCameraAspect()

void Editor::Components::ViewportScene::UpdateCameraAspect ( int  width,
int  height 
)

Update camera aspect ratio.

Parameters
widthViewport width
heightViewport height

◆ UpdateCameraSettings()

void Editor::Components::ViewportScene::UpdateCameraSettings ( float  fov,
float  orthoSize,
float  nearPlane,
float  farPlane 
)

Update camera settings.

Parameters
fovField of view for perspective cameras
orthoSizeOrthographic size for parallel cameras

The documentation for this class was generated from the following files: