This is the main building function for the GUI of the Demo apps. 
  238         ImGui::Begin(
"Loading",
 
  240                      ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoNavInputs);
 
  243         float height = 
static_cast<float>(
sv->
viewportH());
 
  244         ImGui::SetWindowSize(ImVec2(width, height));
 
  245         ImGui::SetWindowPos(ImVec2(0, 0));
 
  247         ImVec2 center(0.5f * width, 0.5f * height);
 
  249         ImDrawList* drawList = ImGui::GetWindowDrawList();
 
  251         drawList->AddRectFilled(ImVec2(0, 0), ImVec2(width, height), IM_COL32(40, 40, 40, 255));
 
  252         drawList->AddCircle(center, 50, IM_COL32(105, 125, 145, 255), 0, 10.0f);
 
  254         float offset = 8.0f * 
static_cast<float>(ImGui::GetTime());
 
  255         drawList->PathArcTo(center, 50, offset, offset + 0.25f * 2 * 
PI);
 
  256         drawList->PathStroke(IM_COL32(250, 165, 0, 255), 0, 10.0f);
 
  259         ImGui::SetCursorPosX(0.5f * (width - ImGui::CalcTextSize(text).x));
 
  260         ImGui::SetCursorPosY(0.5f * height + 100.0f);
 
  283             ImGui::Begin(
"Parallel Job in Progress",
 
  285                          ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoNavInputs);
 
  286             ImGui::Text(
"Parallel Job in Progress:");
 
  293                 ImGui::ProgressBar(num / max);
 
  297                 ImGui::Text(
"Progress: %c", 
"|/-\\"[(
int)(ImGui::GetTime() / 0.05f) & 3]);
 
  301             ImGui::Text(
"Parallel Jobs to follow: %u",
 
  303             ImGui::Text(
"Sequential Jobs to follow: %u",
 
  312                 static bool               opt_fullscreen_persistant = 
true;
 
  313                 bool                      opt_fullscreen            = opt_fullscreen_persistant;
 
  314                 static ImGuiDockNodeFlags dockspace_flags           = ImGuiDockNodeFlags_PassthruCentralNode;
 
  318                 ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNavInputs;
 
  321                     ImGuiViewport* viewport = ImGui::GetMainViewport();
 
  322                     ImGui::SetNextWindowPos(viewport->WorkPos);
 
  323                     ImGui::SetNextWindowSize(viewport->WorkSize);
 
  324                     ImGui::SetNextWindowViewport(viewport->ID);
 
  325                     ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
 
  326                     ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
 
  327                     window_flags |= ImGuiWindowFlags_NoTitleBar |
 
  328                                     ImGuiWindowFlags_NoCollapse |
 
  329                                     ImGuiWindowFlags_NoResize |
 
  330                                     ImGuiWindowFlags_NoMove |
 
  331                                     ImGuiWindowFlags_NoBringToFrontOnFocus |
 
  332                                     ImGuiWindowFlags_NoNavFocus;
 
  337                 if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
 
  338                     window_flags |= ImGuiWindowFlags_NoBackground;
 
  345                 ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
 
  346                 ImGui::Begin(
"DockSpace Demo", &
showDockSpace, window_flags);
 
  347                 ImGui::PopStyleVar();
 
  350                     ImGui::PopStyleVar(2);
 
  353                 ImGuiIO& io = ImGui::GetIO();
 
  354                 if (io.ConfigFlags & ImGuiConfigFlags_DockingEnable)
 
  356                     ImGuiID dockspace_id = ImGui::GetID(
"MyDockSpace");
 
  357                     ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
 
  366                 ImGui::Begin(
"About SLProject", &
showAbout, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
 
  373                 ImGui::TextWrapped(
"%s", 
infoAbout.c_str());
 
  381                 ImGui::Begin(
"Help on Interaction", &
showHelp, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
 
  382                 ImGui::TextWrapped(
"%s", 
infoHelp.c_str());
 
  390                 ImGui::Begin(
"Help on Camera Calibration", &
showHelpCalibration, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
 
  399                 ImGui::Begin(
"Credits for all Contributors and external Libraries", &
showCredits, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
 
  427 #ifndef SL_EMSCRIPTEN 
  446 #ifndef SL_EMSCRIPTEN 
  460                     snprintf(m + strlen(m), 
sizeof(m), 
"Renderer   : OpenGL\n");
 
  461                     snprintf(m + strlen(m), 
sizeof(m), 
"Load time  : %5.1f ms\n", 
s->
loadTimeMS());
 
  467                     snprintf(m + strlen(m), 
sizeof(m), 
"FPS        : %5.1f\n", 
s->
fps());
 
  468                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame time : %5.1f ms (100%%)\n", ft);
 
  469                     snprintf(m + strlen(m), 
sizeof(m), 
" Capture   : %5.1f ms (%3d%%)\n", captureTime, (
SLint)captureTimePC);
 
  470                     snprintf(m + strlen(m), 
sizeof(m), 
" Update    : %5.1f ms (%3d%%)\n", updateTime, (
SLint)updateTimePC);
 
  471 #ifdef SL_USE_ENTITIES 
  474                     snprintf(m + strlen(m), 
sizeof(m), 
"  EntityWM : %5.1f ms (%3d%%)\n", updateDODTime, (
SLint)updateDODTimePC);
 
  478                         snprintf(m + strlen(m), 
sizeof(m), 
"  Anim.    : %5.1f ms (%3d%%)\n", updateAnimTime, (
SLint)updateAnimTimePC);
 
  479                         snprintf(m + strlen(m), 
sizeof(m), 
"  AABB     : %5.1f ms (%3d%%)\n", updateAABBTime, (
SLint)updateAABBTimePC);
 
  482 #ifndef SL_EMSCRIPTEN 
  485                         snprintf(m + strlen(m), 
sizeof(m), 
"  Tracking : %5.1f ms (%3d%%)\n", trackingTime, (
SLint)trackingTimePC);
 
  486                         snprintf(m + strlen(m), 
sizeof(m), 
"   Detect  : %5.1f ms (%3d%%)\n", detectTime, (
SLint)detectTimePC);
 
  487                         snprintf(m + strlen(m), 
sizeof(m), 
"    Det1   : %5.1f ms\n", detect1Time);
 
  488                         snprintf(m + strlen(m), 
sizeof(m), 
"    Det2   : %5.1f ms\n", detect2Time);
 
  489                         snprintf(m + strlen(m), 
sizeof(m), 
"   Match   : %5.1f ms (%3d%%)\n", matchTime, (
SLint)matchTimePC);
 
  490                         snprintf(m + strlen(m), 
sizeof(m), 
"   OptFlow : %5.1f ms (%3d%%)\n", optFlowTime, (
SLint)optFlowTimePC);
 
  491                         snprintf(m + strlen(m), 
sizeof(m), 
"   Pose    : %5.1f ms (%3d%%)\n", poseTime, (
SLint)poseTimePC);
 
  494                     snprintf(m + strlen(m), 
sizeof(m), 
" Shadows   : %5.1f ms (%3d%%)\n", shadowMapTime, (
SLint)shadowMapTimePC);
 
  495                     snprintf(m + strlen(m), 
sizeof(m), 
" Culling   : %5.1f ms (%3d%%)\n", cullTime, (
SLint)cullTimePC);
 
  496                     snprintf(m + strlen(m), 
sizeof(m), 
" Drawing 3D: %5.1f ms (%3d%%)\n", draw3DTime, (
SLint)draw3DTimePC);
 
  497                     snprintf(m + strlen(m), 
sizeof(m), 
" Drawing 2D: %5.1f ms (%3d%%)\n", draw2DTime, (
SLint)draw2DTimePC);
 
  499                 else if (rType == 
RT_rt)
 
  509                     snprintf(m + strlen(m), 
sizeof(m), 
"Renderer   :Ray Tracer\n");
 
  510                     snprintf(m + strlen(m), 
sizeof(m), 
"Progress   :%3d%%\n", rt->
progressPC());
 
  511                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame size :%d x %d\n", rtWidth, rtHeight);
 
  512                     snprintf(m + strlen(m), 
sizeof(m), 
"FPS        :%0.2f\n", fps);
 
  513                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame Time :%0.3f sec.\n", renderSec);
 
  514                     snprintf(m + strlen(m), 
sizeof(m), 
"Rays per ms:%0.0f\n", rt->
raysPerMS());
 
  516                     snprintf(m + strlen(m), 
sizeof(m), 
"Threads    :%d\n", rt->
numThreads());
 
  517                     snprintf(m + strlen(m), 
sizeof(m), 
"----------------------------\n");
 
  518                     snprintf(m + strlen(m), 
sizeof(m), 
"Total rays :%9d (%3d%%)\n", rayTotal, 100);
 
  519                     snprintf(m + strlen(m), 
sizeof(m), 
"  Primary  :%9d (%3d%%)\n", rayPrimaries, (
int)((
float)rayPrimaries / (
float)rayTotal * 100.0f));
 
  525                     snprintf(m + strlen(m), 
sizeof(m), 
"----------------------------\n");
 
  527                     snprintf(m + strlen(m), 
sizeof(m), 
"Avg. depth :%0.3f\n", 
SLRay::avgDepth / (
float)rayPrimaries);
 
  529 #if defined(SL_BUILD_WITH_OPTIX) && defined(SL_HAS_OPTIX) 
  532                     SLOptixRaytracer* ort = 
sv->optixRaytracer();
 
  533                     snprintf(m + strlen(m), 
sizeof(m), 
"Renderer   :OptiX Ray Tracer\n");
 
  534                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame size :%d x %d\n", 
sv->
scrW(), 
sv->
scrH());
 
  535                     snprintf(m + strlen(m), 
sizeof(m), 
"FPS        :%5.1f\n", 
s->
fps());
 
  536                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame Time :%0.3f sec.\n", 1.0f / 
s->
fps());
 
  540                     SLOptixPathtracer* opt = 
sv->optixPathtracer();
 
  541                     snprintf(m + strlen(m), 
sizeof(m), 
"Renderer   :OptiX Ray Tracer\n");
 
  542                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame size :%d x %d\n", 
sv->
scrW(), 
sv->
scrH());
 
  543                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame Time :%0.2f sec.\n", opt->renderSec());
 
  544                     snprintf(m + strlen(m), 
sizeof(m), 
"Denoiser Time :%0.0f ms.\n", opt->denoiserMS());
 
  547                 else if (rType == 
RT_pt)
 
  554                     snprintf(m + strlen(m), 
sizeof(m), 
"Renderer   :Path Tracer\n");
 
  555                     snprintf(m + strlen(m), 
sizeof(m), 
"Progress   :%3d%%\n", pt->
progressPC());
 
  556                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame size :%d x %d\n", ptWidth, ptHeight);
 
  557                     snprintf(m + strlen(m), 
sizeof(m), 
"FPS        :%0.2f\n", 1.0f / pt->
renderSec());
 
  558                     snprintf(m + strlen(m), 
sizeof(m), 
"Frame Time :%0.2f sec.\n", pt->
renderSec());
 
  559                     snprintf(m + strlen(m), 
sizeof(m), 
"Rays per ms:%0.0f\n", pt->
raysPerMS());
 
  560                     snprintf(m + strlen(m), 
sizeof(m), 
"Samples/pix:%d\n", pt->
aaSamples());
 
  561                     snprintf(m + strlen(m), 
sizeof(m), 
"Threads    :%d\n", pt->
numThreads());
 
  562                     snprintf(m + strlen(m), 
sizeof(m), 
"---------------------------\n");
 
  563                     snprintf(m + strlen(m), 
sizeof(m), 
"Total rays :%8d (%3d%%)\n", rayTotal, 100);
 
  566                     snprintf(m + strlen(m), 
sizeof(m), 
"  TIR      :%8d\n", 
SLRay::tirRays);
 
  568                     snprintf(m + strlen(m), 
sizeof(m), 
"---------------------------\n");
 
  571                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
  572                 ImGui::Begin(
"Timing", &
showStatsTiming, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
  573                 ImGui::TextUnformatted(m);
 
  586                 SLfloat      voxelsEmpty       = vox > 0.0f ? voxEmpty / vox * 100.0f : 0.0f;
 
  588                 SLfloat      avgTriPerVox      = vox > 0.0f ? numRTTria / (vox - voxEmpty) : 0.0f;
 
  602                     for (
auto* i : t->images())
 
  603                         cpuMBTexture += (
float)i->bytesPerImage();
 
  604                 cpuMBTexture = cpuMBTexture / 1E6f;
 
  608                 SLfloat cpuMBTotal     = cpuMBTexture + cpuMBMeshes + cpuMBVoxels;
 
  609                 SLint   cpuMBTexturePC = 
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBTexture / cpuMBTotal * 100.0f);
 
  610                 SLint   cpuMBMeshesPC  = 
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBMeshes / cpuMBTotal * 100.0f);
 
  611                 SLint   cpuMBVoxelsPC  = 
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBVoxels / cpuMBTotal * 100.0f);
 
  614                 SLfloat gpuMBTotal     = gpuMBTexture + gpuMBVbo;
 
  615                 SLint   gpuMBTexturePC = 
std::abs(gpuMBTotal) < 1E-5 ? 0 : (
SLint)(gpuMBTexture / gpuMBTotal * 100.0f);
 
  616                 SLint   gpuMBVboPC     = 
std::abs(gpuMBTotal) < 1E-5 ? 0 : (
SLint)(gpuMBVbo / gpuMBTotal * 100.0f);
 
  618                 snprintf(m + strlen(m), 
sizeof(m), 
"No. of Nodes  :%5d (100%%)\n", stats3D.
numNodes);
 
  619                 snprintf(m + strlen(m), 
sizeof(m), 
"- Group Nodes :%5d (%3d%%)\n", stats3D.
numNodesGroup, numGroupPC);
 
  620                 snprintf(m + strlen(m), 
sizeof(m), 
"- Leaf  Nodes :%5d (%3d%%)\n", stats3D.
numNodesLeaf, numLeafPC);
 
  621                 snprintf(m + strlen(m), 
sizeof(m), 
"- Light Nodes :%5d (%3d%%)\n", stats3D.
numLights, numLightsPC);
 
  622                 snprintf(m + strlen(m), 
sizeof(m), 
"- Opaque Nodes:%5d (%3d%%)\n", stats3D.
numNodesOpaque, numOpaquePC);
 
  623                 snprintf(m + strlen(m), 
sizeof(m), 
"- Blend Nodes :%5d (%3d%%)\n", stats3D.
numNodesBlended, numBlendedPC);
 
  624                 snprintf(m + strlen(m), 
sizeof(m), 
"- Overdrawn N.:%5d (%3d%%)\n", numOverdrawnNodes, numOverdrawnPC);
 
  625                 snprintf(m + strlen(m), 
sizeof(m), 
"- Vis. Nodes  :%5d (%3d%%)\n", numVisibleNodes, numVisiblePC);
 
  627                 snprintf(m + strlen(m), 
sizeof(m), 
"No. of Meshes :%5u\n", stats3D.
numMeshes);
 
  628                 snprintf(m + strlen(m), 
sizeof(m), 
"No. of Tri.   :%5u\n", stats3D.
numTriangles);
 
  629                 snprintf(m + strlen(m), 
sizeof(m), 
"CPU MB Total  :%6.2f (100%%)\n", cpuMBTotal);
 
  630                 snprintf(m + strlen(m), 
sizeof(m), 
"-   MB Tex.   :%6.2f (%3d%%)\n", cpuMBTexture, cpuMBTexturePC);
 
  631                 snprintf(m + strlen(m), 
sizeof(m), 
"-   MB Meshes :%6.2f (%3d%%)\n", cpuMBMeshes, cpuMBMeshesPC);
 
  632                 snprintf(m + strlen(m), 
sizeof(m), 
"-   MB Voxels :%6.2f (%3d%%)\n", cpuMBVoxels, cpuMBVoxelsPC);
 
  633                 snprintf(m + strlen(m), 
sizeof(m), 
"GPU MB Total  :%6.2f (100%%)\n", gpuMBTotal);
 
  634                 snprintf(m + strlen(m), 
sizeof(m), 
"-   MB Tex.   :%6.2f (%3d%%)\n", gpuMBTexture, gpuMBTexturePC);
 
  635                 snprintf(m + strlen(m), 
sizeof(m), 
"-   MB VBO    :%6.2f (%3d%%)\n", gpuMBVbo, gpuMBVboPC);
 
  636                 snprintf(m + strlen(m), 
sizeof(m), 
"No. of Voxels :%d\n", stats3D.
numVoxels);
 
  637                 snprintf(m + strlen(m), 
sizeof(m), 
"-empty Voxels :%4.1f%%\n", voxelsEmpty);
 
  638                 snprintf(m + strlen(m), 
sizeof(m), 
"Avg.Tri/Voxel :%4.1f\n", avgTriPerVox);
 
  639                 snprintf(m + strlen(m), 
sizeof(m), 
"Max.Tri/Voxel :%d\n", stats3D.
numVoxMaxTria);
 
  642                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
  643                 ImGui::Begin(
"Scene Statistics", &
showStatsScene, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
  646                 ImGui::TextUnformatted(m);
 
  648                 ImGui::Text(
"Global Resources:");
 
  650                 string label = 
"Meshes (" + std::to_string(am->
meshes().size()) + 
")";
 
  651                 if (am->
meshes().size() && ImGui::TreeNode(label.c_str()))
 
  654                         ImGui::Text(
"[%d] %s (%u v.)",
 
  656                                     am->
meshes()[i]->name().c_str(),
 
  662                 label = 
"Lights (" + std::to_string(
s->
lights().size()) + 
")";
 
  663                 if (
s->
lights().size() && ImGui::TreeNode(label.c_str()))
 
  668                         ImGui::Text(
"[%u] %s", i, light->
name().c_str());
 
  679                         SLVNode& matNodes = mat->nodesVisible3D();
 
  688                             if (ImGui::TreeNode(m))
 
  690                                 for (
auto* node : matNodes)
 
  691                                     ImGui::Text(node->name().c_str());
 
  703                 label = 
"Meshes (" + std::to_string(am->
textures().size()) + 
")";
 
  704                 if (am->
textures().size() && ImGui::TreeNode(label.c_str()))
 
  708                         if (am->
textures()[i]->images().empty())
 
  709                             ImGui::Text(
"[%u] %s on GPU (%s)", i, am->
textures()[i]->name().c_str(), am->
textures()[i]->isTexture() ? 
"ok" : 
"not ok");
 
  711                             ImGui::Text(
"[%u] %s (%s)", i, am->
textures()[i]->name().c_str(), am->
textures()[i]->isTexture() ? 
"ok" : 
"not ok");
 
  717                 label = 
"Programs in AM (" + std::to_string(am->
programs().size()) + 
")";
 
  718                 if (am->
programs().size() && ImGui::TreeNode(label.c_str()))
 
  723                         ImGui::Text(
"[%u] %s", i, p->
name().c_str());
 
  729                 if (ImGui::TreeNode(label.c_str()))
 
  752                     mirrored = 
"horizontally & vertically";
 
  754                     mirrored = 
"horizontally";
 
  756                     mirrored = 
"vertically";
 
  758                 snprintf(m + strlen(m), 
sizeof(m), 
"Video Type   : %s\n", vt == 
VT_NONE ? 
"None" : vt == 
VT_MAIN ? 
"Main Camera" 
  760                                                                                                                  : 
"Secondary Camera");
 
  762                 snprintf(m + strlen(m), 
sizeof(m), 
"Capture size : %d x %d\n", capSize.width, capSize.height);
 
  763                 snprintf(m + strlen(m), 
sizeof(m), 
"Size Index   : %d\n", ac->
camSizeIndex());
 
  764                 snprintf(m + strlen(m), 
sizeof(m), 
"Mirrored     : %s\n", mirrored.c_str());
 
  766                 snprintf(m + strlen(m), 
sizeof(m), 
"Undistorted  : %s\n", ac->
showUndistorted() ? 
"Yes" : 
"No");
 
  769                 snprintf(m + strlen(m), 
sizeof(m), 
"fx,fy        : %4.1f,%4.1f\n", c->
fx(), c->
fy());
 
  770                 snprintf(m + strlen(m), 
sizeof(m), 
"cx,cy        : %4.1f,%4.1f\n", c->
cx(), c->
cy());
 
  773                 const float f              = 100.f;
 
  774                 snprintf(m + strlen(m), 
sizeof(m), 
"dist.(*10e-2):\n");
 
  775                 snprintf(m + strlen(m), 
sizeof(m), 
"k1,k2        : %4.2f,%4.2f\n", c->
k1() * f, c->
k2() * f);
 
  776                 snprintf(m + strlen(m), 
sizeof(m), 
"p1,p2        : %4.2f,%4.2f\n", c->
p1() * f, c->
p2() * f);
 
  777                 if (distortionSize >= 8)
 
  778                     snprintf(m + strlen(m), 
sizeof(m), 
"k3,k4,k5,k6  : %4.2f,%4.2f,%4.2f,%4.2f\n", c->
k3() * f, c->
k4() * f, c->
k5() * f, c->
k6() * f);
 
  780                     snprintf(m + strlen(m), 
sizeof(m), 
"k3           : %4.2f\n", c->
k3() * f);
 
  782                 if (distortionSize >= 12)
 
  783                     snprintf(m + strlen(m), 
sizeof(m), 
"s1,s2,s3,s4  : %4.2f,%4.2f,%4.2f,%4.2f\n", c->
s1() * f, c->
s2() * f, c->
s3() * f, c->
s4() * f);
 
  784                 if (distortionSize >= 14)
 
  785                     snprintf(m + strlen(m), 
sizeof(m), 
"tauX,tauY    : %4.2f,%4.2f\n", c->
tauX() * f, c->
tauY() * f);
 
  787                 snprintf(m + strlen(m), 
sizeof(m), 
"Calib. time  : %s\n", c->
calibrationTime().c_str());
 
  788                 snprintf(m + strlen(m), 
sizeof(m), 
"Calib. state : %s\n", c->
stateStr().c_str());
 
  789                 snprintf(m + strlen(m), 
sizeof(m), 
"Num. caps    : %d\n", c->
numCapturedImgs());
 
  793                     snprintf(m + strlen(m), 
sizeof(m), 
"-------------:\n");
 
  797                         snprintf(m + strlen(m), 
sizeof(m), 
"Dist. to zero: %4.2f\n", cameraPos.
length());
 
  803                         SLVec3f camToObj  = objectPos - cameraPos;
 
  804                         snprintf(m + strlen(m), 
sizeof(m), 
"Dist. to obj.: %4.2f\n", camToObj.
length());
 
  809                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
  810                 ImGui::Begin(
"Video", &
showStatsVideo, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
  811                 ImGui::TextUnformatted(m);
 
  818                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
  819                 ImGui::Begin(
"WAI Statistics", &
showStatsWAI, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
  821                 if (!AverageTiming::instance().empty())
 
  826                     AverageTiming::getTimingMessage(m);
 
  829                     ImGui::TextUnformatted(m);
 
  838                 ImGui::ShowMetricsWindow();
 
  844                 ImGuiWindowFlags window_flags = 0;
 
  845                 window_flags |= ImGuiWindowFlags_NoTitleBar;
 
  846                 window_flags |= ImGuiWindowFlags_NoResize;
 
  847                 window_flags |= ImGuiWindowFlags_NoScrollbar;
 
  848                 window_flags |= ImGuiWindowFlags_NoNavInputs;
 
  850                 ImVec2   size = ImGui::CalcTextSize(
s->
info().c_str(),
 
  857                 ImGui::SetNextWindowPos(ImVec2(0, (
float)
sv->
scrH() - h));
 
  858                 ImGui::SetNextWindowSize(ImVec2(w, h));
 
  860                 ImGui::SetCursorPosX((w - size.x) * 0.5f);
 
  861                 ImGui::TextWrapped(
"%s", info.c_str());
 
  867                 ImGuiWindowFlags window_flags = 0;
 
  868                 window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
 
  869                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
  870                 ImGui::Begin(
"Transform Selected Node", &
showTransform, window_flags);
 
  876                     SLfloat                 t1 = 0.1f, t2 = 1.0f, t3 = 10.0f; 
 
  877                     SLfloat                 r1 = 1.0f, r2 = 5.0f, r3 = 15.0f; 
 
  878                     SLfloat                 s1 = 1.01f, s2 = 1.1f, s3 = 1.5f; 
 
  881                     ImGui::Text(
"Space:");
 
  883                     if (ImGui::RadioButton(
"World", (
int *) &tSpace, 0)) tSpace = 
TS_world;
 
  885                     if (ImGui::RadioButton(
"Parent", (
int *) &tSpace, 1)) tSpace = 
TS_parent;
 
  887                     if (ImGui::RadioButton(
"Object", (
int *) &tSpace, 2)) tSpace = 
TS_object;
 
  890                     ImGui::Text(
"Transl. X :");
 
  892                     if (ImGui::Button(
"<<<##Tx")) selNode->
translate(-t3, 0, 0, tSpace);
 
  894                     if (ImGui::Button(
"<<##Tx")) selNode->
translate(-t2, 0, 0, tSpace);
 
  896                     if (ImGui::Button(
"<##Tx")) selNode->
translate(-t1, 0, 0, tSpace);
 
  898                     if (ImGui::Button(
">##Tx")) selNode->
translate(t1, 0, 0, tSpace);
 
  900                     if (ImGui::Button(
">>##Tx")) selNode->
translate(t2, 0, 0, tSpace);
 
  902                     if (ImGui::Button(
">>>##Tx")) selNode->
translate(t3, 0, 0, tSpace);
 
  904                     ImGui::Text(
"Transl. Y :");
 
  906                     if (ImGui::Button(
"<<<##Ty")) selNode->
translate(0, -t3, 0, tSpace);
 
  908                     if (ImGui::Button(
"<<##Ty")) selNode->
translate(0, -t2, 0, tSpace);
 
  910                     if (ImGui::Button(
"<##Ty")) selNode->
translate(0, -t1, 0, tSpace);
 
  912                     if (ImGui::Button(
">##Ty")) selNode->
translate(0, t1, 0, tSpace);
 
  914                     if (ImGui::Button(
">>##Ty")) selNode->
translate(0, t2, 0, tSpace);
 
  916                     if (ImGui::Button(
">>>##Ty")) selNode->
translate(0, t3, 0, tSpace);
 
  918                     ImGui::Text(
"Transl. Z :");
 
  920                     if (ImGui::Button(
"<<<##Tz")) selNode->
translate(0, 0, -t3, tSpace);
 
  922                     if (ImGui::Button(
"<<##Tz")) selNode->
translate(0, 0, -t2, tSpace);
 
  924                     if (ImGui::Button(
"<##Tz")) selNode->
translate(0, 0, -t1, tSpace);
 
  926                     if (ImGui::Button(
">##Tz")) selNode->
translate(0, 0, t1, tSpace);
 
  928                     if (ImGui::Button(
">>##Tz")) selNode->
translate(0, 0, t2, tSpace);
 
  930                     if (ImGui::Button(
">>>##Tz")) selNode->
translate(0, 0, t3, tSpace);
 
  932                     ImGui::Text(
"Rotation X:");
 
  934                     if (ImGui::Button(
"<<<##Rx")) selNode->
rotate(r3, 1, 0, 0, tSpace);
 
  936                     if (ImGui::Button(
"<<##Rx")) selNode->
rotate(r2, 1, 0, 0, tSpace);
 
  938                     if (ImGui::Button(
"<##Rx")) selNode->
rotate(r1, 1, 0, 0, tSpace);
 
  940                     if (ImGui::Button(
">##Rx")) selNode->
rotate(-r1, 1, 0, 0, tSpace);
 
  942                     if (ImGui::Button(
">>##Rx")) selNode->
rotate(-r2, 1, 0, 0, tSpace);
 
  944                     if (ImGui::Button(
">>>##Rx")) selNode->
rotate(-r3, 1, 0, 0, tSpace);
 
  946                     ImGui::Text(
"Rotation Y:");
 
  948                     if (ImGui::Button(
"<<<##Ry")) selNode->
rotate(r3, 0, 1, 0, tSpace);
 
  950                     if (ImGui::Button(
"<<##Ry")) selNode->
rotate(r2, 0, 1, 0, tSpace);
 
  952                     if (ImGui::Button(
"<##Ry")) selNode->
rotate(r1, 0, 1, 0, tSpace);
 
  954                     if (ImGui::Button(
">##Ry")) selNode->
rotate(-r1, 0, 1, 0, tSpace);
 
  956                     if (ImGui::Button(
">>##Ry")) selNode->
rotate(-r2, 0, 1, 0, tSpace);
 
  958                     if (ImGui::Button(
">>>##Ry")) selNode->
rotate(-r3, 0, 1, 0, tSpace);
 
  960                     ImGui::Text(
"Rotation Z:");
 
  962                     if (ImGui::Button(
"<<<##Rz")) selNode->
rotate(r3, 0, 0, 1, tSpace);
 
  964                     if (ImGui::Button(
"<<##Rz")) selNode->
rotate(r2, 0, 0, 1, tSpace);
 
  966                     if (ImGui::Button(
"<##Rz")) selNode->
rotate(r1, 0, 0, 1, tSpace);
 
  968                     if (ImGui::Button(
">##Rz")) selNode->
rotate(-r1, 0, 0, 1, tSpace);
 
  970                     if (ImGui::Button(
">>##Rz")) selNode->
rotate(-r2, 0, 0, 1, tSpace);
 
  972                     if (ImGui::Button(
">>>##Rz")) selNode->
rotate(-r3, 0, 0, 1, tSpace);
 
  974                     ImGui::Text(
"Scale     :");
 
  976                     if (ImGui::Button(
"<<<##S")) selNode->
scale(s3);
 
  978                     if (ImGui::Button(
"<<##S")) selNode->
scale(s2);
 
  980                     if (ImGui::Button(
"<##S")) selNode->
scale(s1);
 
  982                     if (ImGui::Button(
">##S")) selNode->
scale(-s1);
 
  984                     if (ImGui::Button(
">>##S")) selNode->
scale(-s2);
 
  986                     if (ImGui::Button(
">>>##S")) selNode->
scale(-s3);
 
  990                     if (ImGui::Button(
"Reset"))
 
  995                     ImGui::Text(
"No node selected.");
 
  996                     ImGui::Text(
"Please select a node by double clicking it.");
 
 1011                 snprintf(m + strlen(m), 
sizeof(m), 
"SLProject Version: %s\n", 
AppCommon::version.c_str());
 
 1013                 snprintf(m + strlen(m), 
sizeof(m), 
"Build Config.    : Debug\n");
 
 1015                 snprintf(m + strlen(m), 
sizeof(m), 
"Build Config.    : Release\n");
 
 1017                 snprintf(m + strlen(m), 
sizeof(m), 
"-----------------:\n");
 
 1025                 snprintf(m + strlen(m), 
sizeof(m), 
"-----------------:\n");
 
 1026                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenGL Version   : %s\n", stateGL->
glVersionNO().c_str());
 
 1027                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenGL Vendor    : %s\n", stateGL->
glVendor().c_str());
 
 1028                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenGL Renderer  : %s\n", stateGL->
glRenderer().c_str());
 
 1029                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenGL GLSL Ver. : %s\n", stateGL->
glSLVersionNO().c_str());
 
 1030                 snprintf(m + strlen(m), 
sizeof(m), 
"-----------------:\n");
 
 1031                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenCV Version   : %d.%d.%d\n", CV_MAJOR_VERSION, CV_MINOR_VERSION, CV_VERSION_REVISION);
 
 1032                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenCV has OpenCL: %s\n", cv::ocl::haveOpenCL() ? 
"yes" : 
"no");
 
 1033                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenCV has AVX   : %s\n", cv::checkHardwareSupport(CV_AVX) ? 
"yes" : 
"no");
 
 1034                 snprintf(m + strlen(m), 
sizeof(m), 
"OpenCV has NEON  : %s\n", cv::checkHardwareSupport(CV_NEON) ? 
"yes" : 
"no");
 
 1035                 snprintf(m + strlen(m), 
sizeof(m), 
"-----------------:\n");
 
 1037                 snprintf(m + strlen(m), 
sizeof(m), 
"Eigen Version    : %d.%d.%d\n", EIGEN_WORLD_VERSION, EIGEN_MAJOR_VERSION, EIGEN_MINOR_VERSION);
 
 1038 #    ifdef EIGEN_VECTORIZE 
 1039                 snprintf(m + strlen(m), 
sizeof(m), 
"Eigen vectorize  : yes\n");
 
 1041                 snprintf(m + strlen(m), 
sizeof(m), 
"Eigen vectorize  : no\n");
 
 1044                 snprintf(m + strlen(m), 
sizeof(m), 
"-----------------:\n");
 
 1045                 snprintf(m + strlen(m), 
sizeof(m), 
"ImGui Version    : %s\n", ImGui::GetVersion());
 
 1048                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
 1049                 ImGui::Begin(
"Device Informations", &
showInfosDevice, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1050                 ImGui::TextUnformatted(m);
 
 1060                 snprintf(m + strlen(m), 
sizeof(m), 
"Uses IMU Senor   : %s\n", 
AppCommon::devRot.isUsed() ? 
"yes" : 
"no");
 
 1061                 snprintf(m + strlen(m), 
sizeof(m), 
"Pitch (deg)      : %3.1f\n", 
AppCommon::devRot.pitchDEG());
 
 1062                 snprintf(m + strlen(m), 
sizeof(m), 
"Yaw   (deg)      : %3.1f\n", 
AppCommon::devRot.yawDEG());
 
 1063                 snprintf(m + strlen(m), 
sizeof(m), 
"Roll  (deg)      : %3.1f\n", 
AppCommon::devRot.rollDEG());
 
 1064                 snprintf(m + strlen(m), 
sizeof(m), 
"No. averaged     : %d\n", 
AppCommon::devRot.numAveraged());
 
 1067                 snprintf(m + strlen(m), 
sizeof(m), 
"Rot. Offset mode : %s\n", 
AppCommon::devRot.offsetModeStr().c_str());
 
 1068                 snprintf(m + strlen(m), 
sizeof(m), 
"------------------\n");
 
 1069                 snprintf(m + strlen(m), 
sizeof(m), 
"Uses GPS Sensor  : %s\n", 
AppCommon::devLoc.isUsed() ? 
"yes" : 
"no");
 
 1070                 snprintf(m + strlen(m), 
sizeof(m), 
"Latitude (deg)   : %10.5f\n", 
AppCommon::devLoc.locLatLonAlt().lat);
 
 1071                 snprintf(m + strlen(m), 
sizeof(m), 
"Longitude (deg)  : %10.5f\n", 
AppCommon::devLoc.locLatLonAlt().lon);
 
 1072                 snprintf(m + strlen(m), 
sizeof(m), 
"Alt. used (m)    : %10.2f\n", 
AppCommon::devLoc.locLatLonAlt().alt);
 
 1073                 snprintf(m + strlen(m), 
sizeof(m), 
"Alt. GPS (m)     : %10.2f\n", 
AppCommon::devLoc.altGpsM());
 
 1074                 snprintf(m + strlen(m), 
sizeof(m), 
"Alt. DEM (m)     : %10.2f\n", 
AppCommon::devLoc.altDemM());
 
 1075                 snprintf(m + strlen(m), 
sizeof(m), 
"Alt. origin (m)  : %10.2f\n", 
AppCommon::devLoc.altDemM());
 
 1076                 snprintf(m + strlen(m), 
sizeof(m), 
"Accuracy Rad.(m) : %6.1f\n", 
AppCommon::devLoc.locAccuracyM());
 
 1077                 snprintf(m + strlen(m), 
sizeof(m), 
"Dist. Origin (m) : %6.1f\n", offsetToOrigin.
length());
 
 1078                 snprintf(m + strlen(m), 
sizeof(m), 
"Origin improve(s): %6.1f sec.\n", 
AppCommon::devLoc.improveTime());
 
 1079                 snprintf(m + strlen(m), 
sizeof(m), 
"Loc. Offset mode : %s\n", 
AppCommon::devLoc.offsetModeStr().c_str());
 
 1083                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
 1084                 ImGui::Begin(
"Sensor Information", &
showInfosSensors, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1085                 ImGui::TextUnformatted(m);
 
 1102                 ImGuiWindowFlags window_flags = 0;
 
 1103                 window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
 
 1104                 window_flags |= ImGuiWindowFlags_NoNavInputs;
 
 1106                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
 1107                 ImGui::Begin(
"User Interface Preferences", &
showUIPrefs, window_flags);
 
 1108                 ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.66f);
 
 1112                 ImGuiStyle& style = ImGui::GetStyle();
 
 1114                 if (ImGui::SliderFloat(
"Item Spacing X", &style.ItemSpacing.x, 0.0f, 20.0f, 
"%0.0f"))
 
 1115                     style.WindowPadding.x = style.FramePadding.x = style.ItemInnerSpacing.x = style.ItemSpacing.x;
 
 1117                 if (ImGui::SliderFloat(
"Item Spacing Y", &style.ItemSpacing.y, 0.0f, 20.0f, 
"%0.0f"))
 
 1119                     style.FramePadding.y = style.ItemInnerSpacing.y = style.ItemSpacing.y;
 
 1120                     style.WindowPadding.y                           = style.ItemSpacing.y * 3;
 
 1130                 snprintf(reset, 
sizeof(reset), 
"Reset User Interface (DPI: %d)", 
sv->
dpi());
 
 1131                 if (ImGui::MenuItem(reset))
 
 1138                 ImGui::PopItemWidth();
 
 1148                     ImGuiWindowFlags window_flags = 0;
 
 1149                     window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
 
 1150                     window_flags |= ImGuiWindowFlags_NoNavInputs;
 
 1152                     ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
 1153                     ImGui::Begin(
"Date and Time Settings", &
showDateAndTime, window_flags);
 
 1154                     ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.66f);
 
 1158                         memcpy(<, std::localtime(&
adjustedTime), 
sizeof(tm));
 
 1161                         std::time_t now = std::time(
nullptr);
 
 1162                         memcpy(<, std::localtime(&now), 
sizeof(tm));
 
 1165                     SLint month = lt.tm_mon + 1;
 
 1166                     if (ImGui::SliderInt(
"Month", &month, 1, 12))
 
 1168                         lt.tm_mon    = month - 1;
 
 1174                     if (ImGui::SliderInt(
"Day", <.tm_mday, 1, 31))
 
 1184                     if (ImGui::SliderFloat(
"Hour", &nowF, SRh, SSh, 
"%.2f"))
 
 1186                         lt.tm_hour   = (int)nowF;
 
 1187                         lt.tm_min    = (int)((nowF - 
floor(nowF)) * 60.0f);
 
 1194                     std::time_t now = std::time(
nullptr);
 
 1196                     memcpy(&tnow, std::localtime(&now), 
sizeof(tm));
 
 1197                     snprintf(strTime, 
sizeof(strTime), 
"Set now (%02d.%02d.%02d %02d:%02d)", tnow.tm_mday, tnow.tm_mon + 1, tnow.tm_year + 1900, tnow.tm_hour, tnow.tm_min);
 
 1198                     if (ImGui::MenuItem(strTime))
 
 1201                         memcpy(<, std::localtime(&now), 
sizeof(tm));
 
 1205                     snprintf(strTime, 
sizeof(strTime), 
"Set highest noon (21.07.%02d 12:00)", lt.tm_year - 100);
 
 1206                     if (ImGui::MenuItem(strTime))
 
 1218                     snprintf(strTime, 
sizeof(strTime), 
"Set lowest noon (21.12.%02d 12:00)", lt.tm_year - 100);
 
 1219                     if (ImGui::MenuItem(strTime))
 
 1239                         float    sum_aPdP     = aP + dP;
 
 1240                         float    ambiFraction = aP / sum_aPdP;
 
 1242                         if (ImGui::SliderFloat(
"Direct-Indirect", &ambiFraction, 0.0f, 1.0f, 
"%.2f"))
 
 1249                     ImGui::PopItemWidth();
 
 1259                 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
 
 1265                     ImGui::Begin(
"Christoffel",
 
 1267                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1280                     if (ImGui::Checkbox(
"Christoffelturm 1500-1800", &chrAltIsOn))
 
 1287                     if (ImGui::Checkbox(
"Christoffelturm 1800-1865", &chrNeuIsOn))
 
 1293                     if (ImGui::Checkbox(
"Baldachin", &baldachin))
 
 1301 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1303                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1306                     lookAtPoint.
set(-21, 18, 6);
 
 1309                         bool namedLocIsActive = namedLocIndex == i;
 
 1310                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1326                     ImGui::Begin(
"Biel Campus Biel/Bienne",
 
 1328                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1330 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1332                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1337                         bool namedLocIsActive = namedLocIndex == i;
 
 1338                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1346                     ImGui::Begin(
"Augst-Theatre-Temple",
 
 1348                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1350 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1352                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1357                         bool namedLocIsActive = namedLocIndex == i;
 
 1358                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1366                     ImGui::Begin(
"Avenche-Amphitheatre",
 
 1368                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1370 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1372                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1377                         bool namedLocIsActive = namedLocIndex == i;
 
 1378                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1386                     ImGui::Begin(
"Avenche-Cigognier",
 
 1388                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1390 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1392                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1397                         bool namedLocIsActive = namedLocIndex == i;
 
 1398                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1405                     ImGui::Begin(
"Avenche-Theatre",
 
 1407                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1409 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1411                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1416                         bool namedLocIsActive = namedLocIndex == i;
 
 1417                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
 1425                     ImGui::Begin(
"Sutz-Kirchrain18",
 
 1427                                  ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
 
 1429 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID) 
 1431                     if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
 
 1436                         bool namedLocIsActive = namedLocIndex == i;
 
 1437                         if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
 
void centerNextWindow(SLSceneView *sv, SLfloat widthPC=0.9f, SLfloat heightPC=0.9f)
Centers the next ImGui window in the parent.
 
static SLNode * balda_stahl
 
static SLNode * balda_glas
 
SLNode * gVideoTrackedNode
 
static SLTransformNode * transformNode
 
CVTracked * gVideoTracker
 
@ SID_ErlebAR_BernChristoffel
 
@ SID_ErlebAR_AventicumAmphiteatre
 
@ SID_ErlebAR_AventicumCigognier
 
@ SID_ErlebAR_AventicumTheatre
 
@ SID_ErlebAR_AugustaRauricaTmpTht
 
@ SID_ErlebAR_SutzKirchrain18
 
CVVideoType
Video type if multiple exist on mobile devices.
 
@ VT_FILE
Loads a video from file with OpenCV.
 
@ VT_NONE
No camera needed.
 
@ VT_MAIN
Main camera on all on all all devices.
 
@ P_stereoSideBySideD
side-by-side distorted for Oculus Rift like glasses
 
SLRenderType
Rendering type enumeration.
 
@ RT_optix_pt
Path Tracing with OptiX.
 
@ RT_optix_rt
Ray Tracing with OptiX.
 
SLTransformSpace
Describes the relative space a transformation is applied in.
 
SLStdShaderProg
Enumeration for standard shader programs.
 
deque< SLNode * > SLVNode
SLVNode typedef for a vector of SLNodes.
 
static SLstring version
SLProject version string.
 
static SLDeviceRotation devRot
Mobile device rotation from IMU.
 
static int jobProgressMax()
 
static deque< function< void(void)> > jobsToBeThreaded
Queue of functions to be executed in a thread.
 
static SLstring configPath
Default path for calibration files.
 
static string jobProgressMsg()
Thread-safe getter of the progress message.
 
static SLAssetManager * assetManager
asset manager is the owner of all assets
 
static SLstring gitCommit
Current GIT commit short hash id.
 
static atomic< bool > jobIsRunning
True if a parallel job is running.
 
static SLDeviceLocation devLoc
Mobile device location from GPS.
 
static SLstring gitBranch
Current GIT branch.
 
static int jobProgressNum()
 
static deque< function< void(void)> > jobsToFollowInMain
Queue of function to follow in the main thread.
 
static SLstring gitDate
Current GIT commit date.
 
static SLstring configuration
Debug or Release configuration.
 
static SLSceneID sceneID
ID of currently loaded scene.
 
static SLScene * scene
Pointer to the one and only SLScene instance.
 
static void loadConfig(SLint dotsPerInch)
Loads the UI configuration.
 
static SLbool showImGuiMetrics
Flag if imgui metrics infor should be shown.
 
static SLstring infoCalibrate
Calibration info string.
 
static SLbool hideUI
Flag if menubar should be shown.
 
static SLbool showHelpCalibration
Flag if calibration info should be shown.
 
static SLbool showCredits
Flag if credits info should be shown.
 
static SLbool showDateAndTime
Flag if date-time dialog should be shown.
 
static SLbool showStatsTiming
Flag if timing info should be shown.
 
static SLbool showSceneGraph
Flag if scene graph should be shown.
 
static SLbool showUIPrefs
Flag if UI preferences.
 
static SLbool showProperties
Flag if properties should be shown.
 
static SLbool showErlebAR
Flag if Christoffel infos should be shown.
 
static SLbool showTransform
Flag if transform dialog should be shown.
 
static void buildSceneGraph(SLScene *s)
Builds the scenegraph dialog once per frame.
 
static SLstring infoCredits
Credits info string.
 
static void setActiveNamedLocation(int locIndex, SLSceneView *sv, SLVec3f lookAtPoint=SLVec3f::ZERO)
Set the a new active named location from SLDeviceLocation.
 
static void removeTransformNode(SLScene *s)
Searches and removes the transform node.
 
static SLstring loadingString
String shown during loading screens.
 
static SLbool showProgress
Flag if about info should be shown.
 
static SLbool showInfosSensors
Flag if device sensors info should be shown.
 
static SLbool showInfosDevice
Flag if device info should be shown.
 
static SLbool showStatsScene
Flag if scene info should be shown.
 
static void buildMenuBar(SLScene *s, SLSceneView *sv)
Builds the entire menu bar once per frame.
 
static SLbool showInfosScene
Flag if scene info should be shown.
 
static SLstring infoHelp
Help info string.
 
static void buildProperties(SLScene *s, SLSceneView *sv)
Builds the properties dialog once per frame.
 
static SLstring infoAbout
About info string.
 
static std::time_t adjustedTime
Adjusted GUI time for sun setting (default 0)
 
static SLbool showStatsWAI
Flag if WAI info should be shown.
 
static SLbool showHelp
Flag if help info should be shown.
 
static SLbool showStatsVideo
Flag if video info should be shown.
 
static void buildMenuContext(SLScene *s, SLSceneView *sv)
Builds context menu if right mouse click is over non-imgui area.
 
static SLbool showAbout
Flag if about info should be shown.
 
static SLbool showDockSpace
Flag if dock space should be enabled.
 
Live video camera calibration class with OpenCV an OpenCV calibration.
 
float boardSquareMM() const
 
const CVMat & distortion() const
 
CVSize imageSizeOriginal() const
 
int numCapturedImgs() const
 
float cameraFovHDeg() const
 
float cameraFovVDeg() const
 
string calibrationTime() const
 
CVCalibration calibration
 
void showUndistorted(bool su)
 
CVCamera * activeCamera
Pointer to the active camera.
 
CVSize captureSize
size of captured frame
 
void videoType(CVVideoType vt)
Setter for video type also sets the active calibration.
 
CVMat lastFrame
last frame grabbed in BGR
 
static CVCapture * instance()
Public static instance getter for singleton pattern.
 
AvgFloat & captureTimesMS()
get number of frames in video
 
static AvgFloat trackingTimesMS
Averaged time for video tracking in ms.
 
static AvgFloat optFlowTimesMS
Averaged time for video feature optical flow tracking in ms.
 
static AvgFloat detectTimesMS
Averaged time for video feature detection & description in ms.
 
static AvgFloat detect1TimesMS
Averaged time for video feature detection subpart 1 in ms.
 
static AvgFloat detect2TimesMS
Averaged time for video feature detection subpart 2 in ms.
 
static AvgFloat matchTimesMS
Averaged time for video feature matching in ms.
 
static AvgFloat poseTimesMS
Averaged time for video feature pose estimation in ms.
 
SLVstring & animationNames()
 
Toplevel holder of the assets meshes, materials, textures and shaders.
 
SLVGLProgram & programs()
 
SLVGLTexture & textures()
 
Active or visible camera node class.
 
SLbool calculateSolarAngles(SLVec3d locationLatLonAlt, std::time_t time)
Calculates the solar angles at origin at local time.
 
SLfloat originSolarSunset() const
 
void activeNamedLocation(SLint locIndex)
 
void sunLightNode(SLLightDirect *sln)
 
void isUsed(SLbool isUsed)
Setter that turns on the device rotation sensor.
 
SLVec3d originENU() const
 
SLVLocation & nameLocations()
 
SLfloat originSolarSunrise() const
 
SLbool get(SLuint bit)
Returns the specified bit.
 
void set(SLuint bit, SLbool state)
Sets the specified bit to the passed state.
 
Encapsulation of an OpenGL shader program object.
 
static size_t size()
Returns the size of the program map.
 
static SLGLProgramGeneric * get(SLStdShaderProg id)
Get program reference for given id.
 
Singleton class holding all OpenGL states.
 
static SLGLState * instance()
Public static instance getter for singleton pattern.
 
static SLuint totalNumBytesOnGPU
Total NO. of bytes used for textures on GPU.
 
static SLuint totalDrawCalls
 
static SLuint totalPrimitivesRendered
static total no. of draw calls
 
static SLuint totalBufferSize
static total no. of buffers in use
 
static SLfloat fontPropDots
Default font size of proportional font.
 
static SLfloat fontFixedDots
Default font size of fixed size font.
 
SLLightDirect class for a directional light source.
 
Abstract Light class for OpenGL light sources.
 
void ambientPower(const SLfloat ambPow)
 
void diffusePower(const SLfloat diffPow)
 
SLVec3< T > translation() const
 
SLNode represents a node in a hierarchical scene graph.
 
void rotate(const SLQuat4f &rot, SLTransformSpace relativeTo=TS_object)
 
const SLMat4f & updateAndGetWM() const
 
static SLuint numWMUpdates
NO. of calls to updateWMRec per frame.
 
T * findChild(const SLstring &name="", SLbool findRecursive=true)
 
void om(const SLMat4f &mat)
 
const SLMat4f & initialOM()
 
void translate(const SLVec3f &vec, SLTransformSpace relativeTo=TS_object)
 
Classic Monte Carlo Pathtracing algorithm for real global illumination.
 
static SLuint tirRays
NO. of TIR refraction rays.
 
static SLuint reflectedRays
NO. of reflected rays.
 
static SLint maxDepthReached
max. depth reached for all rays
 
static SLuint refractedRays
NO. of refracted rays.
 
static SLuint subsampledPixels
NO. of of subsampled pixels.
 
static SLuint totalNumRays()
Total NO. of rays shot during RT.
 
static SLfloat avgDepth
average depth reached
 
static SLuint subsampledRays
NO. of of subsampled rays.
 
static SLuint shadowRays
NO. of shadow rays.
 
SLRaytracer hold all the methods for Whitted style Ray Tracing.
 
SLfloat renderSec() const
 
static SLuint numThreads()
 
void resolutionFactor(SLfloat rf)
 
void aaSamples(SLint samples)
 
AvgFloat & frameTimesMS()
 
AvgFloat & updateAABBTimesMS()
 
AvgFloat & updateAnimTimesMS()
 
AvgFloat & updateTimesMS()
 
SLAnimManager & animManager()
 
void root3D(SLNode *root3D)
 
AvgFloat & updateDODTimesMS()
 
void loadTimeMS(SLfloat loadTimeMS)
 
SceneView class represents a dynamic real time 3D view onto the scene.
 
AvgFloat & shadowMapTimeMS()
 
AvgFloat & draw3DTimesMS()
 
std::unordered_set< SLMaterial * > & visibleMaterials3D()
 
AvgFloat & draw2DTimesMS()
 
void camera(SLCamera *camera)
 
SLPathtracer * pathtracer()
 
void renderType(SLRenderType rt)
 
SLRaytracer * raytracer()
 
SLVNode & nodesOverdrawn()
 
static SLuint drawCalls
NO. of draw calls for shadow mapping.
 
void set(const T X, const T Y, const T Z)
 
T clamp(T a, T min, T max)
 
string toString(float f, int roundedDecimals)
Returns a string from a float with max. one trailing zero.
 
bool deleteFile(string &pathfilename)
Deletes a file on the filesystem.
 
Struct for scene graph statistics.
 
SLuint numVoxMaxTria
Max. no. of triangles per voxel.
 
SLuint numBytesAccel
NO. of bytes in accel. structs.
 
SLuint numNodesOpaque
NO. of visible opaque nodes.
 
SLuint numMeshes
NO. of meshes in node.
 
SLuint numNodes
NO. of children nodes.
 
SLuint numLights
NO. of lights in mesh.
 
SLuint numTriangles
NO. of triangles in mesh.
 
SLuint numNodesBlended
NO. of visible blended nodes.
 
SLuint numNodesLeaf
NO. of leaf nodes.
 
SLuint numVoxels
NO. of voxels.
 
SLuint numNodesGroup
NO. of group nodes.
 
SLuint numBytes
NO. of bytes allocated.
 
SLfloat numVoxEmpty
NO. of empty voxels.