SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
WAIAppTest.h
Go to the documentation of this file.
1
#ifndef WAI_APP_TEST_H
2
#define WAI_APP_TEST_H
3
4
#include <string>
5
#include <
SLInputEventInterface.h
>
6
#include <
SLGLTexture.h
>
7
#include <
SLCamera.h
>
8
9
class
SLSceneView
;
10
class
SENSCamera;
11
12
//-----------------------------------------------------------------------------
13
struct
AppDirectories
14
{
15
std::string
writableDir
;
16
std::string
waiDataRoot
;
17
std::string
slDataRoot
;
18
std::string
vocabularyDir
;
19
std::string
logFileDir
;
20
};
21
//-----------------------------------------------------------------------------
22
//! Implements app functionality (e.g. scene description, which camera, how to start and use WAISlam)
23
class
WAIApp
:
public
SLInputEventInterface
24
{
25
public
:
26
using
CloseAppCallback
= std::function<
void
()>;
27
28
WAIApp
();
29
30
void
init
(
int
screenWidth,
31
int
screenHeight,
32
int
screenDpi,
33
AppDirectories
directories);
34
void
initCloseAppCallback
(
CloseAppCallback
cb);
35
void
initCamera
(SENSCamera* camera);
36
37
bool
update
();
38
void
close
();
39
40
// back button pressed
41
void
goBack
();
42
43
private
:
44
void
initSceneCamera
();
45
void
initDirectories
(
AppDirectories
directories);
46
47
// initialize SLScene, SLSceneView and UI
48
void
initSceneGraph
(
int
scrWidth
,
int
scrHeight
,
int
dpi
);
49
void
initIntroScene
();
50
void
deleteSceneGraph
();
51
52
SENSCamera*
_camera
=
nullptr
;
53
54
SLSceneView
*
_sv
=
nullptr
;
55
SLCamera
*
_sceneCamera
=
nullptr
;
56
SLGLTexture
*
_videoImage
=
nullptr
;
57
58
AppDirectories
_dirs
;
59
60
// implanted callback from WaiApp to system to
61
CloseAppCallback
_closeAppCallback
;
62
63
bool
_goBackRequested
=
false
;
64
bool
_initSceneGraphDone
=
false
;
65
bool
_initIntroSceneDone
=
false
;
66
};
67
//-----------------------------------------------------------------------------
68
#endif
// WAI_APP_TEST_H
dpi
static SLint dpi
Dot per inch resolution of screen.
Definition:
AppGLFW.cpp:41
scrHeight
static SLint scrHeight
Window height at start up.
Definition:
AppGLFW.cpp:38
scrWidth
static SLint scrWidth
Window width at start up.
Definition:
AppGLFW.cpp:37
SLCamera.h
void
typedef void(SL_STDCALL *cbOnImGuiBuild)(SLScene *s
Callback function typedef for ImGui build function.
SLGLTexture.h
SLInputEventInterface.h
SLCamera
Active or visible camera node class.
Definition:
SLCamera.h:54
SLGLTexture
Texture object for OpenGL texturing.
Definition:
SLGLTexture.h:110
SLInputEventInterface
Definition:
SLInputEventInterface.h:20
SLSceneView
SceneView class represents a dynamic real time 3D view onto the scene.
Definition:
SLSceneView.h:69
WAIApp
Implements app functionality (e.g. scene description, which camera, how to start and use WAISlam)
Definition:
WAIAppTest.h:24
WAIApp::_camera
SENSCamera * _camera
Definition:
WAIAppTest.h:52
WAIApp::_videoImage
SLGLTexture * _videoImage
Definition:
WAIAppTest.h:56
WAIApp::initSceneCamera
void initSceneCamera()
Definition:
WAIAppTest.cpp:220
WAIApp::init
void init(int screenWidth, int screenHeight, int screenDpi, AppDirectories directories)
Definition:
WAIAppTest.cpp:35
WAIApp::initIntroScene
void initIntroScene()
Definition:
WAIAppTest.cpp:236
WAIApp::_goBackRequested
bool _goBackRequested
Definition:
WAIAppTest.h:63
WAIApp::initDirectories
void initDirectories(AppDirectories directories)
Definition:
WAIAppTest.cpp:80
WAIApp::CloseAppCallback
std::function< void()> CloseAppCallback
Definition:
WAIAppTest.h:26
WAIApp::initCloseAppCallback
void initCloseAppCallback(CloseAppCallback cb)
Definition:
WAIAppTest.cpp:53
WAIApp::WAIApp
WAIApp()
Definition:
WAIAppTest.cpp:30
WAIApp::deleteSceneGraph
void deleteSceneGraph()
Definition:
WAIAppTest.cpp:210
WAIApp::close
void close()
Definition:
WAIAppTest.cpp:196
WAIApp::goBack
void goBack()
Definition:
WAIAppTest.cpp:203
WAIApp::_initIntroSceneDone
bool _initIntroSceneDone
Definition:
WAIAppTest.h:65
WAIApp::_dirs
AppDirectories _dirs
Definition:
WAIAppTest.h:58
WAIApp::_initSceneGraphDone
bool _initSceneGraphDone
Definition:
WAIAppTest.h:64
WAIApp::initCamera
void initCamera(SENSCamera *camera)
Definition:
WAIAppTest.cpp:58
WAIApp::initSceneGraph
void initSceneGraph(int scrWidth, int scrHeight, int dpi)
Definition:
WAIAppTest.cpp:93
WAIApp::_sceneCamera
SLCamera * _sceneCamera
Definition:
WAIAppTest.h:55
WAIApp::_sv
SLSceneView * _sv
Definition:
WAIAppTest.h:54
WAIApp::_closeAppCallback
CloseAppCallback _closeAppCallback
Definition:
WAIAppTest.h:61
WAIApp::update
bool update()
Definition:
WAIAppTest.cpp:124
AppDirectories
Definition:
WAIAppTest.h:14
AppDirectories::logFileDir
std::string logFileDir
Definition:
WAIAppTest.h:19
AppDirectories::writableDir
std::string writableDir
Definition:
WAIAppTest.h:15
AppDirectories::waiDataRoot
std::string waiDataRoot
Definition:
WAIAppTest.h:16
AppDirectories::slDataRoot
std::string slDataRoot
Definition:
WAIAppTest.h:17
AppDirectories::vocabularyDir
std::string vocabularyDir
Definition:
WAIAppTest.h:18
apps
source
wai
WAIAppTest.h
Generated by
1.9.1