SLProject  4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppDemoSceneEmpty.cpp
Go to the documentation of this file.
1 /**
2  * \file AppDemoSceneEmpty.cpp
3  * \brief Implementation for an SLScene inherited class
4  * \details For more info about App framework and the scene assembly see:
5  * https://cpvrlab.github.io/SLProject4/app-framework.html
6  * \date May 2024
7  * \authors Marcus Hudritsch, Marino von Wattenwyl
8  * \copyright http://opensource.org/licenses/GPL-3.0
9  * \remarks Please use clangformat to format the code. See more code style on
10  * https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
11 */
12 
13 #include <AppDemoSceneEmpty.h>
14 #include <SLLightSpot.h>
15 #include <SLRectangle.h>
16 #include <AppCommon.h>
17 
18 //-----------------------------------------------------------------------------
20 {
21  info("No Scene loaded.");
22 }
23 //-----------------------------------------------------------------------------
24 //! All assets the should be loaded in parallel must be registered in here.
26 {
27 }
28 //-----------------------------------------------------------------------------
29 //! After parallel loading of the assets the scene gets assembled in here.
31 {
32  root3D(nullptr);
33 
34  sv->sceneViewCamera()->background().colors(SLCol4f(0.7f, 0.7f, 0.7f),
35  SLCol4f(0.2f, 0.2f, 0.2f));
36  sv->camera(nullptr);
37  sv->doWaitOnIdle(true);
38 }
39 //-----------------------------------------------------------------------------
The AppCommon class holds the top-level instances of the app-demo.
Class declaration for an SLScene inherited class.
SLVec4< SLfloat > SLCol4f
Definition: SLVec4.h:237
void registerAssetsToLoad(SLAssetLoader &al) override
All scene specific assets have to be registered for async loading in here.
void assemble(SLAssetManager *am, SLSceneView *sv) override
After parallel loading of the assets the scene gets assembled in here.
Toplevel holder of the assets meshes, materials, textures and shaders.
void colors(const SLCol4f &uniformColor)
Sets a uniform background color.
SLBackground & background()
Definition: SLCamera.h:165
The SLScene class represents the top level instance holding the scene structure.
Definition: SLScene.h:47
SLNode * root3D()
Definition: SLScene.h:99
SLstring & info()
Definition: SLScene.h:102
SceneView class represents a dynamic real time 3D view onto the scene.
Definition: SLSceneView.h:69
void camera(SLCamera *camera)
Definition: SLSceneView.h:145
void doWaitOnIdle(SLbool doWI)
Definition: SLSceneView.h:149
SLCamera * sceneViewCamera()
Definition: SLSceneView.h:169