SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
AppNodeMain.cpp
Go to the documentation of this file.
1
/**
2
* \file AppNodeMain.cpp
3
* \brief File with the main function and two callbacks for the node demo app
4
* \date July 2014
5
* \authors Marcus Hudritsch
6
* \copyright http://opensource.org/licenses/GPL-3.0
7
* \remarks Please use clangformat to format the code. See more code style on
8
* https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
9
*/
10
11
#include <
App.h
>
12
#include <
AppCommon.h
>
13
#include <
AppNodeGui.h
>
14
#include <
AppNodeSceneView.h
>
15
#include <
AppNodeScene.h
>
16
17
//-----------------------------------------------------------------------------
18
static
SLSceneView
*
createSceneView
(
SLScene
* scene,
19
int
myDPI,
20
SLInputManager
& inputManager)
21
{
22
return
new
AppNodeSceneView
(scene, myDPI, inputManager);
23
}
24
//-----------------------------------------------------------------------------
25
static
SLScene
*
createScene
(
SLSceneID
sceneID
)
26
{
27
return
new
AppNodeScene
();
28
}
29
//-----------------------------------------------------------------------------
30
int
SL_MAIN_FUNCTION
(
int
argc,
char
* argv[])
31
{
32
App::Config
config
;
33
config
.
argc
= argc;
34
config
.
argv
= argv;
35
config
.
windowWidth
= 640;
36
config
.
windowHeight
= 480;
37
config
.
windowTitle
=
"SLProject Node Demo"
;
38
config
.
onNewSceneView
=
createSceneView
;
39
config
.
onNewScene
=
createScene
;
40
config
.
onGuiBuild
=
AppNodeGui::build
;
41
42
return
App::run
(
config
);
43
}
44
//-----------------------------------------------------------------------------
App.h
The App namespace declares the App::Config struct and the App::run function.
AppCommon.h
The AppCommon class holds the top-level instances of the app-demo.
AppNodeGui.h
createSceneView
static SLSceneView * createSceneView(SLScene *scene, int myDPI, SLInputManager &inputManager)
Definition:
AppNodeMain.cpp:18
SL_MAIN_FUNCTION
int SL_MAIN_FUNCTION(int argc, char *argv[])
Definition:
AppNodeMain.cpp:30
createScene
static SLScene * createScene(SLSceneID sceneID)
Definition:
AppNodeMain.cpp:25
AppNodeScene.h
Scene creation callback for the the node demo app.
AppNodeSceneView.h
Node transform test app to demonstrates all transforms of SLNode.
SLSceneID
int SLSceneID
Scene identifier.
Definition:
SLEnums.h:91
sceneID
SLScene SLSceneView SLint sceneID
Definition:
SLScene.h:33
AppNodeGui::build
static void build(SLScene *s, SLSceneView *sv)
Creates the ImGui UI.
Definition:
AppNodeGui.cpp:28
AppNodeScene
Definition:
AppNodeScene.h:18
AppNodeSceneView
Definition:
AppNodeSceneView.h:31
SLInputManager
SLInputManager. manages system input and custom input devices.
Definition:
SLInputManager.h:23
SLScene
The SLScene class represents the top level instance holding the scene structure.
Definition:
SLScene.h:47
SLSceneView
SceneView class represents a dynamic real time 3D view onto the scene.
Definition:
SLSceneView.h:69
App::run
int run(Config config)
App::run implementation from App.h for the Emscripten platform.
Definition:
AppAndroid.cpp:78
App::config
Config config
The configuration set in App::run.
Definition:
AppAndroid.cpp:34
App::Config
App configuration struct to be passed to the App::run function.
Definition:
App.h:57
App::Config::windowWidth
SLint windowWidth
Definition:
App.h:60
App::Config::windowHeight
SLint windowHeight
Definition:
App.h:61
App::Config::onNewSceneView
OnNewSceneViewCallback onNewSceneView
Definition:
App.h:65
App::Config::onNewScene
OnNewSceneCallback onNewScene
Definition:
App.h:66
App::Config::onGuiBuild
OnGuiBuildCallback onGuiBuild
Definition:
App.h:72
App::Config::argc
int argc
Definition:
App.h:58
App::Config::argv
char ** argv
Definition:
App.h:59
App::Config::windowTitle
SLstring windowTitle
Definition:
App.h:62
apps
app_node
AppNodeMain.cpp
Generated by
1.9.1