SLProject 4.0.000
AppDemoGui Class Reference

ImGui UI class for the UI of the demo applications. More...

#include <AppDemoGui.h>

Static Public Member Functions

static void clear ()
 
static void build (SLScene *s, SLSceneView *sv)
 This is the main building function for the GUI of the Demo apps. More...
 
static void buildMenuBar (SLScene *s, SLSceneView *sv)
 Builds the entire menu bar once per frame. More...
 
static void buildMenuEdit (SLScene *s, SLSceneView *sv)
 Builds the edit menu that can be in the menu bar and the context menu. More...
 
static void buildMenuContext (SLScene *s, SLSceneView *sv)
 Builds context menu if right mouse click is over non-imgui area. More...
 
static void buildSceneGraph (SLScene *s)
 Builds the scenegraph dialog once per frame. More...
 
static void addSceneGraphNode (SLScene *s, SLNode *node)
 Builds the node information once per frame. More...
 
static void buildProperties (SLScene *s, SLSceneView *sv)
 Builds the properties dialog once per frame. More...
 
static void showTexInfos (SLGLTexture *tex)
 Shows UI infos for a texture. More...
 
static void loadConfig (SLint dotsPerInch)
 Loads the UI configuration. More...
 
static void saveConfig ()
 Stores the UI configuration. More...
 
static void showLUTColors (SLTexColorLUT *lut)
 Displays a editable color lookup table wit ImGui widgets. More...
 
static void setActiveNamedLocation (int locIndex, SLSceneView *sv, SLVec3f lookAtPoint=SLVec3f::ZERO)
 Set the a new active named location from SLDeviceLocation. More...
 

Static Public Attributes

static SLstring configTime = "-"
 Time of stored configuration. More...
 
static SLstring infoAbout
 About info string. More...
 
static SLstring infoCredits
 Credits info string. More...
 
static SLstring infoHelp
 Help info string. More...
 
static SLstring infoCalibrate
 Calibration info string. More...
 
static SLbool hideUI = false
 Flag if menubar should be shown. More...
 
static SLbool showProgress = false
 Flag if about info should be shown. More...
 
static SLbool showDockSpace = true
 Flag if dock space should be enabled. More...
 
static SLbool showAbout = false
 Flag if about info should be shown. More...
 
static SLbool showHelp = false
 Flag if help info should be shown. More...
 
static SLbool showHelpCalibration = false
 Flag if calibration info should be shown. More...
 
static SLbool showCredits = false
 Flag if credits info should be shown. More...
 
static SLbool showStatsTiming = false
 Flag if timing info should be shown. More...
 
static SLbool showStatsScene = false
 Flag if scene info should be shown. More...
 
static SLbool showStatsVideo = false
 Flag if video info should be shown. More...
 
static SLbool showStatsWAI = false
 Flag if WAI info should be shown. More...
 
static SLbool showImGuiMetrics = false
 Flag if imgui metrics infor should be shown. More...
 
static SLbool showInfosSensors = false
 Flag if device sensors info should be shown. More...
 
static SLbool showInfosDevice = false
 Flag if device info should be shown. More...
 
static SLbool showInfosScene = false
 Flag if scene info should be shown. More...
 
static SLbool showSceneGraph = false
 Flag if scene graph should be shown. More...
 
static SLbool showProperties = false
 Flag if properties should be shown. More...
 
static SLbool showErlebAR = false
 Flag if Christoffel infos should be shown. More...
 
static SLbool showUIPrefs = false
 Flag if UI preferences. More...
 
static SLbool showTransform = false
 Flag if transform dialog should be shown. More...
 
static SLbool showDateAndTime = false
 Flag if date-time dialog should be shown. More...
 
static std::time_t adjustedTime = 0
 Adjusted GUI time for sun setting (default 0) More...
 

Static Private Member Functions

static void setTransformEditMode (SLScene *s, SLSceneView *sv, SLNodeEditMode editMode)
 Adds a transform node for the selected node and toggles the edit mode. More...
 
static void removeTransformNode (SLScene *s)
 Searches and removes the transform node. More...
 
static void showHorizon (SLScene *s, SLSceneView *sv)
 Enables calculation and visualization of horizon line (using rotation sensors) More...
 
static void hideHorizon (SLScene *s)
 Disables calculation and visualization of horizon line. More...
 
static void loadSceneWithLargeModel (SLScene *s, SLSceneView *sv, string downloadFilename, string filenameToLoad, SLSceneID sceneIDToLoad)
 
static void downloadModelAndLoadScene (SLScene *s, SLSceneView *sv, string downloadFilename, string urlFolder, string dstFolder, string filenameToLoad, SLSceneID sceneIDToLoad)
 Parallel HTTP download, unzip and load scene job scheduling. More...
 

Static Private Attributes

static SLbool _horizonVisuEnabled = false
 

Detailed Description

ImGui UI class for the UI of the demo applications.

Member Function Documentation

◆ addSceneGraphNode()

void AppDemoGui::addSceneGraphNode ( SLScene s,
SLNode node 
)
static

Builds the node information once per frame.

◆ build()

void AppDemoGui::build ( SLScene s,
SLSceneView sv 
)
static

This is the main building function for the GUI of the Demo apps.

Is is passed to the AppDemoGui::build function in main of the app-Demo-SLProject app. This function will be called once per frame roughly at the end of SLSceneView::onPaint in SLSceneView::draw2DGL by calling ImGui::Render.
See also the comments on SLGLImGui.

◆ buildMenuBar()

void AppDemoGui::buildMenuBar ( SLScene s,
SLSceneView sv 
)
static

Builds the entire menu bar once per frame.

◆ buildMenuContext()

void AppDemoGui::buildMenuContext ( SLScene s,
SLSceneView sv 
)
static

Builds context menu if right mouse click is over non-imgui area.

◆ buildMenuEdit()

void AppDemoGui::buildMenuEdit ( SLScene s,
SLSceneView sv 
)
static

Builds the edit menu that can be in the menu bar and the context menu.

◆ buildProperties()

void AppDemoGui::buildProperties ( SLScene s,
SLSceneView sv 
)
static

Builds the properties dialog once per frame.

◆ buildSceneGraph()

void AppDemoGui::buildSceneGraph ( SLScene s)
static

Builds the scenegraph dialog once per frame.

◆ clear()

void AppDemoGui::clear ( )
static

◆ downloadModelAndLoadScene()

void AppDemoGui::downloadModelAndLoadScene ( SLScene s,
SLSceneView sv,
string  downloadFilename,
string  urlFolder,
string  dstFolder,
string  filenameToLoad,
SLSceneID  sceneIDToLoad 
)
staticprivate

Parallel HTTP download, unzip and load scene job scheduling.

◆ hideHorizon()

void AppDemoGui::hideHorizon ( SLScene s)
staticprivate

Disables calculation and visualization of horizon line.

◆ loadConfig()

void AppDemoGui::loadConfig ( SLint  dotsPerInch)
static

Loads the UI configuration.

◆ loadSceneWithLargeModel()

void AppDemoGui::loadSceneWithLargeModel ( SLScene s,
SLSceneView sv,
string  downloadFilename,
string  filenameToLoad,
SLSceneID  sceneIDToLoad 
)
staticprivate

◆ removeTransformNode()

void AppDemoGui::removeTransformNode ( SLScene s)
staticprivate

Searches and removes the transform node.

◆ saveConfig()

void AppDemoGui::saveConfig ( )
static

Stores the UI configuration.

◆ setActiveNamedLocation()

void AppDemoGui::setActiveNamedLocation ( int  locIndex,
SLSceneView sv,
SLVec3f  lookAtPoint = SLVec3f::ZERO 
)
static

Set the a new active named location from SLDeviceLocation.

◆ setTransformEditMode()

void AppDemoGui::setTransformEditMode ( SLScene s,
SLSceneView sv,
SLNodeEditMode  editMode 
)
staticprivate

Adds a transform node for the selected node and toggles the edit mode.

◆ showHorizon()

void AppDemoGui::showHorizon ( SLScene s,
SLSceneView sv 
)
staticprivate

Enables calculation and visualization of horizon line (using rotation sensors)

◆ showLUTColors()

void AppDemoGui::showLUTColors ( SLTexColorLUT lut)
static

Displays a editable color lookup table wit ImGui widgets.

◆ showTexInfos()

void AppDemoGui::showTexInfos ( SLGLTexture tex)
static

Shows UI infos for a texture.

Member Data Documentation

◆ _horizonVisuEnabled

SLbool AppDemoGui::_horizonVisuEnabled = false
staticprivate

◆ adjustedTime

std::time_t AppDemoGui::adjustedTime = 0
static

Adjusted GUI time for sun setting (default 0)

◆ configTime

SLstring AppDemoGui::configTime = "-"
static

Time of stored configuration.

◆ hideUI

SLbool AppDemoGui::hideUI = false
static

Flag if menubar should be shown.

◆ infoAbout

SLstring AppDemoGui::infoAbout
static
Initial value:
= R"(
Welcome to the SLProject demo app. It is developed at the Computer Science Department of the Bern University of Applied Sciences.
The app shows what you can learn in two semesters about 3D computer graphics in real time rendering and ray tracing.
The framework is developed in C++ with OpenGL ES so that it can run also on mobile devices.
Ray tracing and path tracing provide additional high quality transparencies, reflections and soft shadows.
Click the X to close and use the menu File > Load Demo Scenes to choose other scenes that each show-case a specific feature of SLProject.
For more information please visit: https://github.com/cpvrlab/SLProject/wiki
)"

About info string.

◆ infoCalibrate

SLstring AppDemoGui::infoCalibrate
static
Initial value:
= R"(
The calibration process requires a chessboard image to be printed and glued on a flat board. You can find the PDF with the chessboard image on:
https://github.com/cpvrlab/SLProject/tree/master/data/calibrations/
For a calibration you have to take 20 images with detected inner chessboard corners. To take an image you have to click with the mouse
or tap with finger into the screen. View the chessboard from the side so that the inner corners cover the full image. Hold the camera or board really still
before taking the picture.
You can mirror the video image under Preferences > Video. You can check the distance to the chessboard in the dialog Stats. on Video.
After calibration the yellow wireframe cube should stick on the chessboard. Please close first this info dialog on the top-left.
)"

Calibration info string.

◆ infoCredits

SLstring AppDemoGui::infoCredits
static
Initial value:
= R"(
Contributors since 2005 in alphabetic order:
Marc Affolter, Martin Christen, Jan Dellsperger, Manuel Frischknecht, Luc Girod, Michael Goettlicher, Michael Schertenleib, Thomas Schneiter, Stefan Thoeni, Timo Tschanz, Marino von Wattenwyl, Marc Wacker, Pascal Zingg
Credits for external libraries:
- assimp: assimp.sourceforge.net
- eigen: eigen.tuxfamily.org
- emscripten: emscripten.org
- imgui: github.com/ocornut/imgui
- gl3w: https://github.com/skaslev/gl3w
- glfw: glfw.org
- g2o: github.com/RainerKuemmerle/g2o
- ktx: khronos.org/ktx
- libigl: libigl.github.io
- mediapipe: developers.google.com/mediapipe
- ORB-SLAM2: github.com/raulmur/ORB_SLAM2
- OpenCV: opencv.org
- OpenGL: opengl.org
- OpenSSL: openssl.org
- spa: midcdmz.nrel.gov/spa
- stb: single file image library
- zlib: zlib.net
)"

Credits info string.

◆ infoHelp

SLstring AppDemoGui::infoHelp
static
Initial value:
= R"(
Help for mouse or finger control:
- Use left mouse or your finger to rotate the scene
- Use mouse-wheel or pinch 2 fingers to go forward/backward
- Use middle-mouse or 2 fingers to move sidewards/up-down
- Double click or double tap to select object
- CTRL-mouse to select vertices of objects
- See keyboard shortcuts behind menu commands
- Check out the different test scenes under File > Load Test Scene
- You can open and dock additional windows from the menu Infos.
)"

Help info string.

◆ showAbout

SLbool AppDemoGui::showAbout = false
static

Flag if about info should be shown.

◆ showCredits

SLbool AppDemoGui::showCredits = false
static

Flag if credits info should be shown.

◆ showDateAndTime

SLbool AppDemoGui::showDateAndTime = false
static

Flag if date-time dialog should be shown.

◆ showDockSpace

SLbool AppDemoGui::showDockSpace = true
static

Flag if dock space should be enabled.

◆ showErlebAR

SLbool AppDemoGui::showErlebAR = false
static

Flag if Christoffel infos should be shown.

◆ showHelp

SLbool AppDemoGui::showHelp = false
static

Flag if help info should be shown.

◆ showHelpCalibration

SLbool AppDemoGui::showHelpCalibration = false
static

Flag if calibration info should be shown.

◆ showImGuiMetrics

SLbool AppDemoGui::showImGuiMetrics = false
static

Flag if imgui metrics infor should be shown.

◆ showInfosDevice

SLbool AppDemoGui::showInfosDevice = false
static

Flag if device info should be shown.

◆ showInfosScene

SLbool AppDemoGui::showInfosScene = false
static

Flag if scene info should be shown.

◆ showInfosSensors

SLbool AppDemoGui::showInfosSensors = false
static

Flag if device sensors info should be shown.

◆ showProgress

SLbool AppDemoGui::showProgress = false
static

Flag if about info should be shown.

◆ showProperties

SLbool AppDemoGui::showProperties = false
static

Flag if properties should be shown.

◆ showSceneGraph

SLbool AppDemoGui::showSceneGraph = false
static

Flag if scene graph should be shown.

◆ showStatsScene

SLbool AppDemoGui::showStatsScene = false
static

Flag if scene info should be shown.

◆ showStatsTiming

SLbool AppDemoGui::showStatsTiming = false
static

Flag if timing info should be shown.

◆ showStatsVideo

SLbool AppDemoGui::showStatsVideo = false
static

Flag if video info should be shown.

◆ showStatsWAI

SLbool AppDemoGui::showStatsWAI = false
static

Flag if WAI info should be shown.

◆ showTransform

SLbool AppDemoGui::showTransform = false
static

Flag if transform dialog should be shown.

◆ showUIPrefs

SLbool AppDemoGui::showUIPrefs = false
static

Flag if UI preferences.


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