MCPcopy Create free account
hub / github.com/cdcseacave/openMVS / SettingsReadLine

Function SettingsReadLine

apps/Viewer/UI.cpp:2776–2830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2774}
2775
2776void SettingsReadLine(ImGuiContext*, ImGuiSettingsHandler* handler, void* entry, const char* line) {
2777 Window& window = *reinterpret_cast<Window*>(handler->UserData);
2778
2779 float x, y, z, w;
2780 int intVal;
2781
2782 if (sscanf(line, "RenderOnlyOnChange=%d", &intVal) == 1) {
2783 window.renderOnlyOnChange = (intVal != 0);
2784 }
2785 else if (sscanf(line, "ClearColor=%f,%f,%f,%f", &x, &y, &z, &w) == 4) {
2786 window.clearColor = Eigen::Vector4f(x, y, z, w);
2787 }
2788 else if (sscanf(line, "CameraSize=%f", &x) == 1) {
2789 window.cameraSize = x;
2790 }
2791 else if (sscanf(line, "PointSize=%f", &x) == 1) {
2792 window.pointSize = x;
2793 }
2794 else if (sscanf(line, "EstimateSfMNormals=%d", &intVal) == 1) {
2795 window.GetScene().estimateSfMNormals = (intVal != 0);
2796 }
2797 else if (sscanf(line, "EstimateSfMPatches=%d", &intVal) == 1) {
2798 window.GetScene().estimateSfMPatches = (intVal != 0);
2799 }
2800 else if (sscanf(line, "ShowCameras=%d", &intVal) == 1) {
2801 window.showCameras = (intVal != 0);
2802 }
2803 else if (sscanf(line, "ShowMeshWireframe=%d", &intVal) == 1) {
2804 window.showMeshWireframe = (intVal != 0);
2805 }
2806 else if (sscanf(line, "ShowMeshTextured=%d", &intVal) == 1) {
2807 window.showMeshTextured = (intVal != 0);
2808 }
2809 else if (sscanf(line, "ImageOverlayOpacity=%f", &x) == 1) {
2810 window.imageOverlayOpacity = x;
2811 }
2812 else if (sscanf(line, "FontScale=%f", &x) == 1) {
2813 window.GetUI().SetUserFontScale(x);
2814 }
2815 else if (sscanf(line, "ArcballRenderGizmos=%d", &intVal) == 1) {
2816 window.GetArcballControls().setEnableGizmos(intVal != 0);
2817 }
2818 else if (sscanf(line, "ArcballRenderGizmosCenter=%d", &intVal) == 1) {
2819 window.GetArcballControls().setEnableGizmosCenter(intVal != 0);
2820 }
2821 else if (sscanf(line, "ArcballRotationSensitivity=%f", &x) == 1) {
2822 window.GetArcballControls().setRotationSensitivity(x);
2823 }
2824 else if (sscanf(line, "ArcballZoomSensitivity=%f", &x) == 1) {
2825 window.GetArcballControls().setZoomSensitivity(x);
2826 }
2827 else if (sscanf(line, "ArcballPanSensitivity=%f", &x) == 1) {
2828 window.GetArcballControls().setPanSensitivity(x);
2829 }
2830}
2831
2832void SettingsWriteAll(ImGuiContext*, ImGuiSettingsHandler* handler, ImGuiTextBuffer* buf) {
2833 Window& window = *reinterpret_cast<Window*>(handler->UserData);

Callers

nothing calls this directly

Calls 6

SetUserFontScaleMethod · 0.80
setEnableGizmosMethod · 0.80
setEnableGizmosCenterMethod · 0.80
setZoomSensitivityMethod · 0.80
setPanSensitivityMethod · 0.80

Tested by

no test coverage detected