Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
CameraApp Class Reference

Application with an interactive camera. More...

#include <Application.hpp>

Public Member Functions

 CameraApp (RenderingConfig &config, Window &window)
 
virtual void update () override
 
virtual void physics (double fullTime, double frameTime)
 
- Public Member Functions inherited from Application
 Application (RenderingConfig &config, Window &window)
 
virtual void draw ()=0
 
virtual void update ()
 
virtual void finish ()
 
virtual void resize ()=0
 
double timeElapsed ()
 
double frameTime ()
 
double frameRate ()
 
Windowwindow ()
 
virtual ~Application ()
 
 Application (const Application &)=delete
 
Applicationoperator= (const Application &)=delete
 
 Application (Application &&)=delete
 
Applicationoperator= (Application &&)=delete
 

Protected Member Functions

void freezeCamera (bool shouldFreeze)
 

Protected Attributes

ControllableCamera _userCamera
 The interactive camera.
 
- Protected Attributes inherited from Application
RenderingConfig_config
 The current configuration.
 
std::unique_ptr< DebugViewer_debug
 Debug viewer.
 

Private Attributes

bool _freezeCamera = false
 Should the camera be frozen.
 
double _fullTime = 0.0
 Time elapsed since the app launch.
 
double _remainingTime = 0.0
 Remaining accumulated time to process.
 
const double _dt = 1.0 / 120.0
 Small physics timestep.
 

Detailed Description

Application with an interactive camera.

Inherits Application.

Inherited by AtmosphereApp, FilteringApp, IslandApp, PBRDemo, PathTracerApp, SceneEditor, ShaderEditor, and StenciledApp.

Constructor & Destructor Documentation

◆ CameraApp()

CameraApp::CameraApp ( RenderingConfig config,
Window window 
)
explicit

Constructor.

Parameters
configthe rendering configuration
windowthe window to render to

Member Function Documentation

◆ freezeCamera()

void CameraApp::freezeCamera ( bool  shouldFreeze)
protected

Prevent the user from interacting with the camera.

Parameters
shouldFreezethe toggle

◆ physics()

void CameraApp::physics ( double  fullTime,
double  frameTime 
)
virtual

Perform physics simulation update.

Parameters
fullTimethe time elapsed since the beginning of the render loop
frameTimethe duration of the last frame
Note
This function can be called multiple times per frame.

Reimplemented in FilteringApp, PathTracerApp, PBRDemo, StenciledApp, and SceneEditor.

◆ update()

void CameraApp::update ( )
overridevirtual

Per-frame update.

Reimplemented from Application.

Reimplemented in AtmosphereApp, FilteringApp, IslandApp, PathTracerApp, PBRDemo, ShaderEditor, StenciledApp, and SceneEditor.


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