This is the main building function for the GUI of the Demo apps.
241 ImGui::Begin(
"Loading",
243 ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoNavInputs);
246 float height =
static_cast<float>(
sv->
viewportH());
247 ImGui::SetWindowSize(ImVec2(width, height));
248 ImGui::SetWindowPos(ImVec2(0, 0));
250 ImVec2 center(0.5f * width, 0.5f * height);
252 ImDrawList* drawList = ImGui::GetWindowDrawList();
254 drawList->AddRectFilled(ImVec2(0, 0), ImVec2(width, height), IM_COL32(40, 40, 40, 255));
255 drawList->AddCircle(center, 50, IM_COL32(105, 125, 145, 255), 0, 10.0f);
257 float offset = 8.0f *
static_cast<float>(ImGui::GetTime());
258 drawList->PathArcTo(center, 50, offset, offset + 0.25f * 2 *
PI);
259 drawList->PathStroke(IM_COL32(250, 165, 0, 255), 0, 10.0f);
262 ImGui::SetCursorPosX(0.5f * (width - ImGui::CalcTextSize(text).x));
263 ImGui::SetCursorPosY(0.5f * height + 100.0f);
286 ImGui::Begin(
"Parallel Job in Progress",
288 ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoNavInputs);
289 ImGui::Text(
"Parallel Job in Progress:");
296 ImGui::ProgressBar(num / max);
300 ImGui::Text(
"Progress: %c",
"|/-\\"[(
int)(ImGui::GetTime() / 0.05f) & 3]);
304 ImGui::Text(
"Parallel Jobs to follow: %u",
306 ImGui::Text(
"Sequential Jobs to follow: %u",
315 static bool opt_fullscreen_persistant =
true;
316 bool opt_fullscreen = opt_fullscreen_persistant;
317 static ImGuiDockNodeFlags dockspace_flags = ImGuiDockNodeFlags_PassthruCentralNode;
321 ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNavInputs;
324 ImGuiViewport* viewport = ImGui::GetMainViewport();
325 ImGui::SetNextWindowPos(viewport->WorkPos);
326 ImGui::SetNextWindowSize(viewport->WorkSize);
327 ImGui::SetNextWindowViewport(viewport->ID);
328 ImGui::PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
329 ImGui::PushStyleVar(ImGuiStyleVar_WindowBorderSize, 0.0f);
330 window_flags |= ImGuiWindowFlags_NoTitleBar |
331 ImGuiWindowFlags_NoCollapse |
332 ImGuiWindowFlags_NoResize |
333 ImGuiWindowFlags_NoMove |
334 ImGuiWindowFlags_NoBringToFrontOnFocus |
335 ImGuiWindowFlags_NoNavFocus;
340 if (dockspace_flags & ImGuiDockNodeFlags_PassthruCentralNode)
341 window_flags |= ImGuiWindowFlags_NoBackground;
348 ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0.0f, 0.0f));
349 ImGui::Begin(
"DockSpace Demo", &
showDockSpace, window_flags);
350 ImGui::PopStyleVar();
353 ImGui::PopStyleVar(2);
356 ImGuiIO& io = ImGui::GetIO();
357 if (io.ConfigFlags & ImGuiConfigFlags_DockingEnable)
359 ImGuiID dockspace_id = ImGui::GetID(
"MyDockSpace");
360 ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f), dockspace_flags);
369 ImGui::Begin(
"About SLProject", &
showAbout, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
376 ImGui::TextWrapped(
"%s",
infoAbout.c_str());
384 ImGui::Begin(
"Help on Interaction", &
showHelp, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
385 ImGui::TextWrapped(
"%s",
infoHelp.c_str());
393 ImGui::Begin(
"Help on Camera Calibration", &
showHelpCalibration, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
402 ImGui::Begin(
"Credits for all Contributors and external Libraries", &
showCredits, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoNavInputs);
430 #ifndef SL_EMSCRIPTEN
449 #ifndef SL_EMSCRIPTEN
463 snprintf(m + strlen(m),
sizeof(m),
"Renderer : OpenGL\n");
464 snprintf(m + strlen(m),
sizeof(m),
"Load time : %5.1f ms\n",
s->
loadTimeMS());
470 snprintf(m + strlen(m),
sizeof(m),
"FPS : %5.1f\n",
s->
fps());
471 snprintf(m + strlen(m),
sizeof(m),
"Frame time : %5.1f ms (100%%)\n", ft);
472 snprintf(m + strlen(m),
sizeof(m),
" Capture : %5.1f ms (%3d%%)\n", captureTime, (
SLint)captureTimePC);
473 snprintf(m + strlen(m),
sizeof(m),
" Update : %5.1f ms (%3d%%)\n", updateTime, (
SLint)updateTimePC);
474 #ifdef SL_USE_ENTITIES
477 snprintf(m + strlen(m),
sizeof(m),
" EntityWM : %5.1f ms (%3d%%)\n", updateDODTime, (
SLint)updateDODTimePC);
481 snprintf(m + strlen(m),
sizeof(m),
" Anim. : %5.1f ms (%3d%%)\n", updateAnimTime, (
SLint)updateAnimTimePC);
482 snprintf(m + strlen(m),
sizeof(m),
" AABB : %5.1f ms (%3d%%)\n", updateAABBTime, (
SLint)updateAABBTimePC);
485 #ifndef SL_EMSCRIPTEN
488 snprintf(m + strlen(m),
sizeof(m),
" Tracking : %5.1f ms (%3d%%)\n", trackingTime, (
SLint)trackingTimePC);
489 snprintf(m + strlen(m),
sizeof(m),
" Detect : %5.1f ms (%3d%%)\n", detectTime, (
SLint)detectTimePC);
490 snprintf(m + strlen(m),
sizeof(m),
" Det1 : %5.1f ms\n", detect1Time);
491 snprintf(m + strlen(m),
sizeof(m),
" Det2 : %5.1f ms\n", detect2Time);
492 snprintf(m + strlen(m),
sizeof(m),
" Match : %5.1f ms (%3d%%)\n", matchTime, (
SLint)matchTimePC);
493 snprintf(m + strlen(m),
sizeof(m),
" OptFlow : %5.1f ms (%3d%%)\n", optFlowTime, (
SLint)optFlowTimePC);
494 snprintf(m + strlen(m),
sizeof(m),
" Pose : %5.1f ms (%3d%%)\n", poseTime, (
SLint)poseTimePC);
497 snprintf(m + strlen(m),
sizeof(m),
" Shadows : %5.1f ms (%3d%%)\n", shadowMapTime, (
SLint)shadowMapTimePC);
498 snprintf(m + strlen(m),
sizeof(m),
" Culling : %5.1f ms (%3d%%)\n", cullTime, (
SLint)cullTimePC);
499 snprintf(m + strlen(m),
sizeof(m),
" Drawing 3D: %5.1f ms (%3d%%)\n", draw3DTime, (
SLint)draw3DTimePC);
500 snprintf(m + strlen(m),
sizeof(m),
" Drawing 2D: %5.1f ms (%3d%%)\n", draw2DTime, (
SLint)draw2DTimePC);
502 else if (rType ==
RT_rt)
512 snprintf(m + strlen(m),
sizeof(m),
"Renderer :Ray Tracer\n");
513 snprintf(m + strlen(m),
sizeof(m),
"Progress :%3d%%\n", rt->
progressPC());
514 snprintf(m + strlen(m),
sizeof(m),
"Frame size :%d x %d\n", rtWidth, rtHeight);
515 snprintf(m + strlen(m),
sizeof(m),
"FPS :%0.2f\n", fps);
516 snprintf(m + strlen(m),
sizeof(m),
"Frame Time :%0.3f sec.\n", renderSec);
517 snprintf(m + strlen(m),
sizeof(m),
"Rays per ms:%0.0f\n", rt->
raysPerMS());
519 snprintf(m + strlen(m),
sizeof(m),
"Threads :%d\n", rt->
numThreads());
520 snprintf(m + strlen(m),
sizeof(m),
"-----------------------------\n");
521 snprintf(m + strlen(m),
sizeof(m),
"Total rays :%10u (%3d%%)\n", rayTotal, 100);
522 snprintf(m + strlen(m),
sizeof(m),
" Primary :%10u (%3d%%)\n", rayPrimaries, (
int)((
float)rayPrimaries / (
float)rayTotal * 100.0f));
528 snprintf(m + strlen(m),
sizeof(m),
"-----------------------------\n");
530 snprintf(m + strlen(m),
sizeof(m),
"Avg. depth :%0.3f\n",
SLRay::avgDepth / (
float)rayPrimaries);
532 #if defined(SL_BUILD_WITH_OPTIX) && defined(SL_HAS_OPTIX)
535 SLOptixRaytracer* ort =
sv->optixRaytracer();
536 snprintf(m + strlen(m),
sizeof(m),
"Renderer :OptiX Ray Tracer\n");
537 snprintf(m + strlen(m),
sizeof(m),
"Frame size :%d x %d\n",
sv->
scrW(),
sv->
scrH());
538 snprintf(m + strlen(m),
sizeof(m),
"FPS :%5.1f\n",
s->
fps());
539 snprintf(m + strlen(m),
sizeof(m),
"Frame Time :%0.3f sec.\n", 1.0f /
s->
fps());
543 SLOptixPathtracer* opt =
sv->optixPathtracer();
544 snprintf(m + strlen(m),
sizeof(m),
"Renderer :OptiX Ray Tracer\n");
545 snprintf(m + strlen(m),
sizeof(m),
"Frame size :%d x %d\n",
sv->
scrW(),
sv->
scrH());
546 snprintf(m + strlen(m),
sizeof(m),
"Frame Time :%0.2f sec.\n", opt->renderSec());
547 snprintf(m + strlen(m),
sizeof(m),
"Denoiser Time :%0.0f ms.\n", opt->denoiserMS());
550 else if (rType ==
RT_pt)
565 snprintf(m + strlen(m),
sizeof(m),
"Renderer :Path Tracer\n");
566 snprintf(m + strlen(m),
sizeof(m),
"Progress :%3d%%\n", pt->
progressPC());
567 snprintf(m + strlen(m),
sizeof(m),
"Frame size :%d x %d\n", ptWidth, ptHeight);
568 snprintf(m + strlen(m),
sizeof(m),
"FPS :%0.2f\n", 1.0f / pt->
renderSec());
569 snprintf(m + strlen(m),
sizeof(m),
"Frame Time :%0.2f sec.\n", pt->
renderSec());
570 snprintf(m + strlen(m),
sizeof(m),
"Rays per ms :%0.0f\n", pt->
raysPerMS());
571 snprintf(m + strlen(m),
sizeof(m),
"Noise RSE :%0.4f\n", pt->
noiseRSE());
572 snprintf(m + strlen(m),
sizeof(m),
"Noise p99.9 :%0.4f\n", pt->
noiseRSE999());
573 snprintf(m + strlen(m),
sizeof(m),
"Efficiency :%0.2f\n", pt->
efficiency());
574 snprintf(m + strlen(m),
sizeof(m),
"Firefly Clamp:%s\n",
clamp);
575 snprintf(m + strlen(m),
sizeof(m),
"Samples/pix :%d\n", pt->
aaSamples());
576 snprintf(m + strlen(m),
sizeof(m),
"Threads :%d\n", pt->
numThreads());
577 snprintf(m + strlen(m),
sizeof(m),
"-------------------------------\n");
578 snprintf(m + strlen(m),
sizeof(m),
"Total rays :%10u (%3d%%)\n", rayTotal, 100);
581 snprintf(m + strlen(m),
sizeof(m),
" TIR :%10u\n",
SLRay::tirRays);
583 snprintf(m + strlen(m),
sizeof(m),
"-------------------------------\n");
586 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
587 ImGui::Begin(
"Timing", &
showStatsTiming, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
588 ImGui::TextUnformatted(m);
601 SLfloat voxelsEmpty = vox > 0.0f ? voxEmpty / vox * 100.0f : 0.0f;
603 SLfloat avgTriPerVox = vox > 0.0f ? numRTTria / (vox - voxEmpty) : 0.0f;
617 for (
auto* i : t->images())
618 cpuMBTexture += (
float)i->bytesPerImage();
619 cpuMBTexture = cpuMBTexture / 1E6f;
623 SLfloat cpuMBTotal = cpuMBTexture + cpuMBMeshes + cpuMBVoxels;
624 SLint cpuMBTexturePC =
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBTexture / cpuMBTotal * 100.0f);
625 SLint cpuMBMeshesPC =
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBMeshes / cpuMBTotal * 100.0f);
626 SLint cpuMBVoxelsPC =
std::abs(cpuMBTotal) < 1E-5f ? 0 : (
SLint)(cpuMBVoxels / cpuMBTotal * 100.0f);
629 SLfloat gpuMBTotal = gpuMBTexture + gpuMBVbo;
630 SLint gpuMBTexturePC =
std::abs(gpuMBTotal) < 1E-5 ? 0 : (
SLint)(gpuMBTexture / gpuMBTotal * 100.0f);
631 SLint gpuMBVboPC =
std::abs(gpuMBTotal) < 1E-5 ? 0 : (
SLint)(gpuMBVbo / gpuMBTotal * 100.0f);
633 snprintf(m + strlen(m),
sizeof(m),
"No. of Nodes :%5d (100%%)\n", stats3D.
numNodes);
634 snprintf(m + strlen(m),
sizeof(m),
"- Group Nodes :%5d (%3d%%)\n", stats3D.
numNodesGroup, numGroupPC);
635 snprintf(m + strlen(m),
sizeof(m),
"- Leaf Nodes :%5d (%3d%%)\n", stats3D.
numNodesLeaf, numLeafPC);
636 snprintf(m + strlen(m),
sizeof(m),
"- Light Nodes :%5d (%3d%%)\n", stats3D.
numLights, numLightsPC);
637 snprintf(m + strlen(m),
sizeof(m),
"- Opaque Nodes:%5d (%3d%%)\n", stats3D.
numNodesOpaque, numOpaquePC);
638 snprintf(m + strlen(m),
sizeof(m),
"- Blend Nodes :%5d (%3d%%)\n", stats3D.
numNodesBlended, numBlendedPC);
639 snprintf(m + strlen(m),
sizeof(m),
"- Overdrawn N.:%5d (%3d%%)\n", numOverdrawnNodes, numOverdrawnPC);
640 snprintf(m + strlen(m),
sizeof(m),
"- Vis. Nodes :%5d (%3d%%)\n", numVisibleNodes, numVisiblePC);
642 snprintf(m + strlen(m),
sizeof(m),
"No. of Meshes :%5u\n", stats3D.
numMeshes);
643 snprintf(m + strlen(m),
sizeof(m),
"No. of Tri. :%5u\n", stats3D.
numTriangles);
644 snprintf(m + strlen(m),
sizeof(m),
"CPU MB Total :%6.2f (100%%)\n", cpuMBTotal);
645 snprintf(m + strlen(m),
sizeof(m),
"- MB Tex. :%6.2f (%3d%%)\n", cpuMBTexture, cpuMBTexturePC);
646 snprintf(m + strlen(m),
sizeof(m),
"- MB Meshes :%6.2f (%3d%%)\n", cpuMBMeshes, cpuMBMeshesPC);
647 snprintf(m + strlen(m),
sizeof(m),
"- MB Voxels :%6.2f (%3d%%)\n", cpuMBVoxels, cpuMBVoxelsPC);
648 snprintf(m + strlen(m),
sizeof(m),
"GPU MB Total :%6.2f (100%%)\n", gpuMBTotal);
649 snprintf(m + strlen(m),
sizeof(m),
"- MB Tex. :%6.2f (%3d%%)\n", gpuMBTexture, gpuMBTexturePC);
650 snprintf(m + strlen(m),
sizeof(m),
"- MB VBO :%6.2f (%3d%%)\n", gpuMBVbo, gpuMBVboPC);
651 snprintf(m + strlen(m),
sizeof(m),
"No. of Voxels :%d\n", stats3D.
numVoxels);
652 snprintf(m + strlen(m),
sizeof(m),
"-empty Voxels :%4.1f%%\n", voxelsEmpty);
653 snprintf(m + strlen(m),
sizeof(m),
"Avg.Tri/Voxel :%4.1f\n", avgTriPerVox);
654 snprintf(m + strlen(m),
sizeof(m),
"Max.Tri/Voxel :%d\n", stats3D.
numVoxMaxTria);
657 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
658 ImGui::Begin(
"Scene Statistics", &
showStatsScene, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
661 ImGui::TextUnformatted(m);
663 ImGui::Text(
"Global Resources:");
665 string label =
"Meshes (" + std::to_string(am->
meshes().size()) +
")";
666 if (am->
meshes().size() && ImGui::TreeNode(label.c_str()))
669 ImGui::Text(
"[%d] %s (%u v.)",
671 am->
meshes()[i]->name().c_str(),
677 label =
"Lights (" + std::to_string(
s->
lights().size()) +
")";
678 if (
s->
lights().size() && ImGui::TreeNode(label.c_str()))
683 ImGui::Text(
"[%u] %s", i, light->
name().c_str());
694 SLVNode& matNodes = mat->nodesVisible3D();
703 if (ImGui::TreeNode(m))
705 for (
auto* node : matNodes)
706 ImGui::Text(node->name().c_str());
718 label =
"Meshes (" + std::to_string(am->
textures().size()) +
")";
719 if (am->
textures().size() && ImGui::TreeNode(label.c_str()))
723 if (am->
textures()[i]->images().empty())
724 ImGui::Text(
"[%u] %s on GPU (%s)", i, am->
textures()[i]->name().c_str(), am->
textures()[i]->isTexture() ?
"ok" :
"not ok");
726 ImGui::Text(
"[%u] %s (%s)", i, am->
textures()[i]->name().c_str(), am->
textures()[i]->isTexture() ?
"ok" :
"not ok");
732 label =
"Programs in AM (" + std::to_string(am->
programs().size()) +
")";
733 if (am->
programs().size() && ImGui::TreeNode(label.c_str()))
738 ImGui::Text(
"[%u] %s", i, p->
name().c_str());
744 if (ImGui::TreeNode(label.c_str()))
767 mirrored =
"horizontally & vertically";
769 mirrored =
"horizontally";
771 mirrored =
"vertically";
773 snprintf(m + strlen(m),
sizeof(m),
"Video Type : %s\n", vt ==
VT_NONE ?
"None" : vt ==
VT_MAIN ?
"Main Camera"
775 :
"Secondary Camera");
777 snprintf(m + strlen(m),
sizeof(m),
"Capture size : %d x %d\n", capSize.width, capSize.height);
778 snprintf(m + strlen(m),
sizeof(m),
"Size Index : %d\n", ac->
camSizeIndex());
779 snprintf(m + strlen(m),
sizeof(m),
"Mirrored : %s\n", mirrored.c_str());
781 snprintf(m + strlen(m),
sizeof(m),
"Undistorted : %s\n", ac->
showUndistorted() ?
"Yes" :
"No");
784 snprintf(m + strlen(m),
sizeof(m),
"fx,fy : %4.1f,%4.1f\n", c->
fx(), c->
fy());
785 snprintf(m + strlen(m),
sizeof(m),
"cx,cy : %4.1f,%4.1f\n", c->
cx(), c->
cy());
788 const float f = 100.f;
789 snprintf(m + strlen(m),
sizeof(m),
"dist.(*10e-2):\n");
790 snprintf(m + strlen(m),
sizeof(m),
"k1,k2 : %4.2f,%4.2f\n", c->
k1() * f, c->
k2() * f);
791 snprintf(m + strlen(m),
sizeof(m),
"p1,p2 : %4.2f,%4.2f\n", c->
p1() * f, c->
p2() * f);
792 if (distortionSize >= 8)
793 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);
795 snprintf(m + strlen(m),
sizeof(m),
"k3 : %4.2f\n", c->
k3() * f);
797 if (distortionSize >= 12)
798 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);
799 if (distortionSize >= 14)
800 snprintf(m + strlen(m),
sizeof(m),
"tauX,tauY : %4.2f,%4.2f\n", c->
tauX() * f, c->
tauY() * f);
802 snprintf(m + strlen(m),
sizeof(m),
"Calib. time : %s\n", c->
calibrationTime().c_str());
803 snprintf(m + strlen(m),
sizeof(m),
"Calib. state : %s\n", c->
stateStr().c_str());
804 snprintf(m + strlen(m),
sizeof(m),
"Num. caps : %d\n", c->
numCapturedImgs());
808 snprintf(m + strlen(m),
sizeof(m),
"-------------:\n");
812 snprintf(m + strlen(m),
sizeof(m),
"Dist. to zero: %4.2f\n", cameraPos.
length());
818 SLVec3f camToObj = objectPos - cameraPos;
819 snprintf(m + strlen(m),
sizeof(m),
"Dist. to obj.: %4.2f\n", camToObj.
length());
824 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
825 ImGui::Begin(
"Video", &
showStatsVideo, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
826 ImGui::TextUnformatted(m);
833 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
834 ImGui::Begin(
"WAI Statistics", &
showStatsWAI, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
836 if (!AverageTiming::instance().empty())
841 AverageTiming::getTimingMessage(m);
844 ImGui::TextUnformatted(m);
853 ImGui::ShowMetricsWindow();
859 ImGuiWindowFlags window_flags = 0;
860 window_flags |= ImGuiWindowFlags_NoTitleBar;
861 window_flags |= ImGuiWindowFlags_NoResize;
862 window_flags |= ImGuiWindowFlags_NoScrollbar;
863 window_flags |= ImGuiWindowFlags_NoNavInputs;
865 ImVec2 size = ImGui::CalcTextSize(
s->
info().c_str(),
872 ImGui::SetNextWindowPos(ImVec2(0, (
float)
sv->
scrH() - h));
873 ImGui::SetNextWindowSize(ImVec2(w, h));
875 ImGui::SetCursorPosX((w - size.x) * 0.5f);
876 ImGui::TextWrapped(
"%s", info.c_str());
882 ImGuiWindowFlags window_flags = 0;
883 window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
884 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
885 ImGui::Begin(
"Transform Selected Node", &
showTransform, window_flags);
891 SLfloat t1 = 0.1f, t2 = 1.0f, t3 = 10.0f;
892 SLfloat r1 = 1.0f, r2 = 5.0f, r3 = 15.0f;
893 SLfloat s1 = 1.01f, s2 = 1.1f, s3 = 1.5f;
896 ImGui::Text(
"Space:");
898 if (ImGui::RadioButton(
"World", (
int *) &tSpace, 0)) tSpace =
TS_world;
900 if (ImGui::RadioButton(
"Parent", (
int *) &tSpace, 1)) tSpace =
TS_parent;
902 if (ImGui::RadioButton(
"Object", (
int *) &tSpace, 2)) tSpace =
TS_object;
905 ImGui::Text(
"Transl. X :");
907 if (ImGui::Button(
"<<<##Tx")) selNode->
translate(-t3, 0, 0, tSpace);
909 if (ImGui::Button(
"<<##Tx")) selNode->
translate(-t2, 0, 0, tSpace);
911 if (ImGui::Button(
"<##Tx")) selNode->
translate(-t1, 0, 0, tSpace);
913 if (ImGui::Button(
">##Tx")) selNode->
translate(t1, 0, 0, tSpace);
915 if (ImGui::Button(
">>##Tx")) selNode->
translate(t2, 0, 0, tSpace);
917 if (ImGui::Button(
">>>##Tx")) selNode->
translate(t3, 0, 0, tSpace);
919 ImGui::Text(
"Transl. Y :");
921 if (ImGui::Button(
"<<<##Ty")) selNode->
translate(0, -t3, 0, tSpace);
923 if (ImGui::Button(
"<<##Ty")) selNode->
translate(0, -t2, 0, tSpace);
925 if (ImGui::Button(
"<##Ty")) selNode->
translate(0, -t1, 0, tSpace);
927 if (ImGui::Button(
">##Ty")) selNode->
translate(0, t1, 0, tSpace);
929 if (ImGui::Button(
">>##Ty")) selNode->
translate(0, t2, 0, tSpace);
931 if (ImGui::Button(
">>>##Ty")) selNode->
translate(0, t3, 0, tSpace);
933 ImGui::Text(
"Transl. Z :");
935 if (ImGui::Button(
"<<<##Tz")) selNode->
translate(0, 0, -t3, tSpace);
937 if (ImGui::Button(
"<<##Tz")) selNode->
translate(0, 0, -t2, tSpace);
939 if (ImGui::Button(
"<##Tz")) selNode->
translate(0, 0, -t1, tSpace);
941 if (ImGui::Button(
">##Tz")) selNode->
translate(0, 0, t1, tSpace);
943 if (ImGui::Button(
">>##Tz")) selNode->
translate(0, 0, t2, tSpace);
945 if (ImGui::Button(
">>>##Tz")) selNode->
translate(0, 0, t3, tSpace);
947 ImGui::Text(
"Rotation X:");
949 if (ImGui::Button(
"<<<##Rx")) selNode->
rotate(r3, 1, 0, 0, tSpace);
951 if (ImGui::Button(
"<<##Rx")) selNode->
rotate(r2, 1, 0, 0, tSpace);
953 if (ImGui::Button(
"<##Rx")) selNode->
rotate(r1, 1, 0, 0, tSpace);
955 if (ImGui::Button(
">##Rx")) selNode->
rotate(-r1, 1, 0, 0, tSpace);
957 if (ImGui::Button(
">>##Rx")) selNode->
rotate(-r2, 1, 0, 0, tSpace);
959 if (ImGui::Button(
">>>##Rx")) selNode->
rotate(-r3, 1, 0, 0, tSpace);
961 ImGui::Text(
"Rotation Y:");
963 if (ImGui::Button(
"<<<##Ry")) selNode->
rotate(r3, 0, 1, 0, tSpace);
965 if (ImGui::Button(
"<<##Ry")) selNode->
rotate(r2, 0, 1, 0, tSpace);
967 if (ImGui::Button(
"<##Ry")) selNode->
rotate(r1, 0, 1, 0, tSpace);
969 if (ImGui::Button(
">##Ry")) selNode->
rotate(-r1, 0, 1, 0, tSpace);
971 if (ImGui::Button(
">>##Ry")) selNode->
rotate(-r2, 0, 1, 0, tSpace);
973 if (ImGui::Button(
">>>##Ry")) selNode->
rotate(-r3, 0, 1, 0, tSpace);
975 ImGui::Text(
"Rotation Z:");
977 if (ImGui::Button(
"<<<##Rz")) selNode->
rotate(r3, 0, 0, 1, tSpace);
979 if (ImGui::Button(
"<<##Rz")) selNode->
rotate(r2, 0, 0, 1, tSpace);
981 if (ImGui::Button(
"<##Rz")) selNode->
rotate(r1, 0, 0, 1, tSpace);
983 if (ImGui::Button(
">##Rz")) selNode->
rotate(-r1, 0, 0, 1, tSpace);
985 if (ImGui::Button(
">>##Rz")) selNode->
rotate(-r2, 0, 0, 1, tSpace);
987 if (ImGui::Button(
">>>##Rz")) selNode->
rotate(-r3, 0, 0, 1, tSpace);
989 ImGui::Text(
"Scale :");
991 if (ImGui::Button(
"<<<##S")) selNode->
scale(s3);
993 if (ImGui::Button(
"<<##S")) selNode->
scale(s2);
995 if (ImGui::Button(
"<##S")) selNode->
scale(s1);
997 if (ImGui::Button(
">##S")) selNode->
scale(-s1);
999 if (ImGui::Button(
">>##S")) selNode->
scale(-s2);
1001 if (ImGui::Button(
">>>##S")) selNode->
scale(-s3);
1005 if (ImGui::Button(
"Reset"))
1010 ImGui::Text(
"No node selected.");
1011 ImGui::Text(
"Please select a node by double clicking it.");
1026 snprintf(m + strlen(m),
sizeof(m),
"SLProject Version: %s\n",
AppCommon::version.c_str());
1028 snprintf(m + strlen(m),
sizeof(m),
"Build Config. : Debug\n");
1030 snprintf(m + strlen(m),
sizeof(m),
"Build Config. : Release\n");
1032 snprintf(m + strlen(m),
sizeof(m),
"-----------------:\n");
1040 snprintf(m + strlen(m),
sizeof(m),
"-----------------:\n");
1041 snprintf(m + strlen(m),
sizeof(m),
"OpenGL Version : %s\n", stateGL->
glVersionNO().c_str());
1042 snprintf(m + strlen(m),
sizeof(m),
"OpenGL Vendor : %s\n", stateGL->
glVendor().c_str());
1043 snprintf(m + strlen(m),
sizeof(m),
"OpenGL Renderer : %s\n", stateGL->
glRenderer().c_str());
1044 snprintf(m + strlen(m),
sizeof(m),
"OpenGL GLSL Ver. : %s\n", stateGL->
glSLVersionNO().c_str());
1045 snprintf(m + strlen(m),
sizeof(m),
"-----------------:\n");
1046 snprintf(m + strlen(m),
sizeof(m),
"OpenCV Version : %d.%d.%d\n", CV_MAJOR_VERSION, CV_MINOR_VERSION, CV_VERSION_REVISION);
1047 snprintf(m + strlen(m),
sizeof(m),
"OpenCV has OpenCL: %s\n", cv::ocl::haveOpenCL() ?
"yes" :
"no");
1048 snprintf(m + strlen(m),
sizeof(m),
"OpenCV has AVX : %s\n", cv::checkHardwareSupport(CV_AVX) ?
"yes" :
"no");
1049 snprintf(m + strlen(m),
sizeof(m),
"OpenCV has NEON : %s\n", cv::checkHardwareSupport(CV_NEON) ?
"yes" :
"no");
1050 snprintf(m + strlen(m),
sizeof(m),
"-----------------:\n");
1052 snprintf(m + strlen(m),
sizeof(m),
"Eigen Version : %d.%d.%d\n", EIGEN_WORLD_VERSION, EIGEN_MAJOR_VERSION, EIGEN_MINOR_VERSION);
1053 # ifdef EIGEN_VECTORIZE
1054 snprintf(m + strlen(m),
sizeof(m),
"Eigen vectorize : yes\n");
1056 snprintf(m + strlen(m),
sizeof(m),
"Eigen vectorize : no\n");
1059 snprintf(m + strlen(m),
sizeof(m),
"-----------------:\n");
1060 snprintf(m + strlen(m),
sizeof(m),
"ImGui Version : %s\n", ImGui::GetVersion());
1063 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
1064 ImGui::Begin(
"Device Informations", &
showInfosDevice, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1065 ImGui::TextUnformatted(m);
1075 snprintf(m + strlen(m),
sizeof(m),
"Uses IMU Senor : %s\n",
AppCommon::devRot.isUsed() ?
"yes" :
"no");
1076 snprintf(m + strlen(m),
sizeof(m),
"Pitch (deg) : %3.1f\n",
AppCommon::devRot.pitchDEG());
1077 snprintf(m + strlen(m),
sizeof(m),
"Yaw (deg) : %3.1f\n",
AppCommon::devRot.yawDEG());
1078 snprintf(m + strlen(m),
sizeof(m),
"Roll (deg) : %3.1f\n",
AppCommon::devRot.rollDEG());
1079 snprintf(m + strlen(m),
sizeof(m),
"No. averaged : %d\n",
AppCommon::devRot.numAveraged());
1082 snprintf(m + strlen(m),
sizeof(m),
"Rot. Offset mode : %s\n",
AppCommon::devRot.offsetModeStr().c_str());
1083 snprintf(m + strlen(m),
sizeof(m),
"------------------\n");
1084 snprintf(m + strlen(m),
sizeof(m),
"Uses GPS Sensor : %s\n",
AppCommon::devLoc.isUsed() ?
"yes" :
"no");
1085 snprintf(m + strlen(m),
sizeof(m),
"Latitude (deg) : %10.5f\n",
AppCommon::devLoc.locLatLonAlt().lat);
1086 snprintf(m + strlen(m),
sizeof(m),
"Longitude (deg) : %10.5f\n",
AppCommon::devLoc.locLatLonAlt().lon);
1087 snprintf(m + strlen(m),
sizeof(m),
"Alt. used (m) : %10.2f\n",
AppCommon::devLoc.locLatLonAlt().alt);
1088 snprintf(m + strlen(m),
sizeof(m),
"Alt. GPS (m) : %10.2f\n",
AppCommon::devLoc.altGpsM());
1089 snprintf(m + strlen(m),
sizeof(m),
"Alt. DEM (m) : %10.2f\n",
AppCommon::devLoc.altDemM());
1090 snprintf(m + strlen(m),
sizeof(m),
"Alt. origin (m) : %10.2f\n",
AppCommon::devLoc.altDemM());
1091 snprintf(m + strlen(m),
sizeof(m),
"Accuracy Rad.(m) : %6.1f\n",
AppCommon::devLoc.locAccuracyM());
1092 snprintf(m + strlen(m),
sizeof(m),
"Dist. Origin (m) : %6.1f\n", offsetToOrigin.
length());
1093 snprintf(m + strlen(m),
sizeof(m),
"Origin improve(s): %6.1f sec.\n",
AppCommon::devLoc.improveTime());
1094 snprintf(m + strlen(m),
sizeof(m),
"Loc. Offset mode : %s\n",
AppCommon::devLoc.offsetModeStr().c_str());
1098 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
1099 ImGui::Begin(
"Sensor Information", &
showInfosSensors, ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1100 ImGui::TextUnformatted(m);
1117 ImGuiWindowFlags window_flags = 0;
1118 window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
1119 window_flags |= ImGuiWindowFlags_NoNavInputs;
1121 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
1122 ImGui::Begin(
"User Interface Preferences", &
showUIPrefs, window_flags);
1123 ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.66f);
1127 ImGuiStyle& style = ImGui::GetStyle();
1129 if (ImGui::SliderFloat(
"Item Spacing X", &style.ItemSpacing.x, 0.0f, 20.0f,
"%0.0f"))
1130 style.WindowPadding.x = style.FramePadding.x = style.ItemInnerSpacing.x = style.ItemSpacing.x;
1132 if (ImGui::SliderFloat(
"Item Spacing Y", &style.ItemSpacing.y, 0.0f, 20.0f,
"%0.0f"))
1134 style.FramePadding.y = style.ItemInnerSpacing.y = style.ItemSpacing.y;
1135 style.WindowPadding.y = style.ItemSpacing.y * 3;
1145 snprintf(reset,
sizeof(reset),
"Reset User Interface (DPI: %d)",
sv->
dpi());
1146 if (ImGui::MenuItem(reset))
1153 ImGui::PopItemWidth();
1163 ImGuiWindowFlags window_flags = 0;
1164 window_flags |= ImGuiWindowFlags_AlwaysAutoResize;
1165 window_flags |= ImGuiWindowFlags_NoNavInputs;
1167 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
1168 ImGui::Begin(
"Date and Time Settings", &
showDateAndTime, window_flags);
1169 ImGui::PushItemWidth(ImGui::GetWindowWidth() * 0.66f);
1173 memcpy(<, std::localtime(&
adjustedTime),
sizeof(tm));
1176 std::time_t now = std::time(
nullptr);
1177 memcpy(<, std::localtime(&now),
sizeof(tm));
1180 SLint month = lt.tm_mon + 1;
1181 if (ImGui::SliderInt(
"Month", &month, 1, 12))
1183 lt.tm_mon = month - 1;
1189 if (ImGui::SliderInt(
"Day", <.tm_mday, 1, 31))
1199 if (ImGui::SliderFloat(
"Hour", &nowF, SRh, SSh,
"%.2f"))
1201 lt.tm_hour = (int)nowF;
1202 lt.tm_min = (int)((nowF -
floor(nowF)) * 60.0f);
1209 std::time_t now = std::time(
nullptr);
1211 memcpy(&tnow, std::localtime(&now),
sizeof(tm));
1212 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);
1213 if (ImGui::MenuItem(strTime))
1216 memcpy(<, std::localtime(&now),
sizeof(tm));
1220 snprintf(strTime,
sizeof(strTime),
"Set highest noon (21.07.%02d 12:00)", lt.tm_year - 100);
1221 if (ImGui::MenuItem(strTime))
1233 snprintf(strTime,
sizeof(strTime),
"Set lowest noon (21.12.%02d 12:00)", lt.tm_year - 100);
1234 if (ImGui::MenuItem(strTime))
1254 float sum_aPdP = aP + dP;
1255 float ambiFraction = aP / sum_aPdP;
1257 if (ImGui::SliderFloat(
"Direct-Indirect", &ambiFraction, 0.0f, 1.0f,
"%.2f"))
1264 ImGui::PopItemWidth();
1274 ImGui::PushFont(ImGui::GetIO().Fonts->Fonts[1]);
1280 ImGui::Begin(
"Christoffel",
1282 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1295 if (ImGui::Checkbox(
"Christoffelturm 1500-1800", &chrAltIsOn))
1302 if (ImGui::Checkbox(
"Christoffelturm 1800-1865", &chrNeuIsOn))
1308 if (ImGui::Checkbox(
"Baldachin", &baldachin))
1316 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1318 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1321 lookAtPoint.
set(-21, 18, 6);
1324 bool namedLocIsActive = namedLocIndex == i;
1325 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1341 ImGui::Begin(
"Biel Campus Biel/Bienne",
1343 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1345 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1347 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1352 bool namedLocIsActive = namedLocIndex == i;
1353 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1361 ImGui::Begin(
"Augst-Theatre-Temple",
1363 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1365 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1367 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1372 bool namedLocIsActive = namedLocIndex == i;
1373 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1381 ImGui::Begin(
"Avenche-Amphitheatre",
1383 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1385 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1387 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1392 bool namedLocIsActive = namedLocIndex == i;
1393 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1401 ImGui::Begin(
"Avenche-Cigognier",
1403 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1405 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1407 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1412 bool namedLocIsActive = namedLocIndex == i;
1413 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1420 ImGui::Begin(
"Avenche-Theatre",
1422 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1424 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1426 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1431 bool namedLocIsActive = namedLocIndex == i;
1432 if (ImGui::Checkbox(
AppCommon::devLoc.nameLocations()[i].name.c_str(), &namedLocIsActive))
1440 ImGui::Begin(
"Sutz-Kirchrain18",
1442 ImGuiWindowFlags_NoResize | ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoNavInputs);
1444 #if defined(SL_OS_MACIOS) || defined(SL_OS_ANDROID)
1446 if (ImGui::Checkbox(
"Use GPS Location", &devLocIsUsed))
1451 bool namedLocIsActive = namedLocIndex == i;
1452 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.
float SLfloat
analog to GLfloat
unsigned int SLuint
analog to GLuint
char SLchar
analog to GLchar (char is signed [-128 ... 127]!)
string SLstring
Redefinition of standard types for platform independence.
@ 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.
SLfloat noiseRSE() const
Mean relative standard error of the pixels of the last render.
void sampleClamp(SLfloat max)
SLfloat efficiency() const
Monte Carlo efficiency, the inverse of variance times time.
SLfloat noiseRSE999() const
Relative standard error of the noisiest 0.1% of the pixels.
static SLuint shadowRays
NO. of shadow rays.
static SLuint tirRays
NO. of TIR refraction rays.
static SLint maxDepthReached
max. depth reached for all rays
static SLuint subsampledPixels
NO. of of subsampled pixels.
static SLuint totalNumRays()
Total NO. of rays shot during RT.
static SLuint reflectedRays
NO. of reflected rays.
static SLfloat avgDepth
average depth reached
static SLuint refractedRays
NO. of refracted rays.
static SLuint subsampledRays
NO. of of subsampled 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)
SLfloat raysPerMS()
Rays per ms of the last completed render, for comparing machines.
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.