ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvGuiParameters.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 /***************************************************
11  GUI parameters
12 ***************************************************/
13 
15 
19 // LOCAL
20 #include "ecvColorTypes.h"
21 
22 // Qt
23 #include <QString>
24 
26 public:
37 
44 
60  double bbOpacity;
62  unsigned bbLineWidth;
63 
69  unsigned minLoDMeshSize;
73  unsigned minLoDCloudSize;
77  bool useVBOs;
78 
80  unsigned labelMarkerSize;
81 
90 
92  unsigned defaultFontSize;
94  unsigned labelFontSize;
98  unsigned labelOpacity;
99 
101  double zoomSpeed;
102 
104  enum ComputeOctreeForPicking { ALWAYS = 0, ASK_USER = 1, NEVER = 2 };
105 
108 
111 
113  ParamStruct();
114 
116  void reset();
117  void initFontSizesIfNeeded();
118 
120  void fromPersistentSettings();
121 
123  void toPersistentSettings() const;
124 
127 
129  bool isInPersistentSettings(QString paramName) const;
130  };
131 
133  static const ParamStruct& Parameters();
134 
136  static void Set(const ParamStruct& params);
137 
138  static void UpdateParameters();
139 
141  static void ReleaseInstance();
142 
143 protected:
146 };
#define CV_DB_LIB_API
Definition: CV_db.h:15
RGB color structure.
Definition: ecvColorTypes.h:49
RGBA color structure.
This class manages some persistent parameters (mostly for display)
ParamStruct params
Parameters set.
Algorithm parameters.
GUI parameters.
ComputeOctreeForPicking
Octree computation (for picking) behaviors.
ecvColor::Rgbaf lightDiffuseColor
Light diffuse color (RGBA)
ecvColor::Rgbaf meshSpecular
Default mesh specular color.
unsigned labelMarkerSize
Label marker size.
ecvColor::Rgbub backgroundCol
Background color.
ecvColor::Rgbaf lightAmbientColor
Light ambient color (RGBA)
unsigned displayedNumPrecision
Displayed numbers precision.
double bbOpacity
Bounding-box opacity (0.0 to 1.0)
ComputeOctreeForPicking autoComputeOctree
Octree computation (for picking) behavior.
unsigned labelFontSize
Label font size.
bool lightDoubleSided
Double sided light.
ecvColor::Rgbub labelMarkerCol
Labels marker color.
ecvColor::Rgbub textDefaultCol
Default text color.
bool drawRoundedPoints
Whether to draw rounded points (slower) or not.
unsigned minLoDCloudSize
Min cloud size for decimation.
unsigned defaultFontSize
Default displayed font size.
ecvColor::Rgbub labelBackgroundCol
Labels background color.
ecvColor::Rgbaf lightSpecularColor
Light specular color (RGBA)
ecvColor::Rgbub bbDefaultCol
Bounding-boxes color.
unsigned colorScaleRampWidth
Color scale ramp width (for display)
bool displayCross
Display cross in the middle of the screen.
bool colorScaleUseShader
Whether to use shader for color scale display (if available) or not.
bool colorScaleShaderSupported
Whether shader for color scale display is available or not.
unsigned bbLineWidth
Bounding-box line width.
unsigned minLoDMeshSize
Min mesh size for decimation.
bool showBBOnSelected
Show bounding-box on selected objects.
ecvColor::Rgbaf meshFrontDiff
Default mesh diffuse color (front)
bool decimateMeshOnMove
Decimate meshes when moved.
bool drawBackgroundGradient
Use background gradient.
bool useVBOs
Whether to use VBOs for faster display.
unsigned labelOpacity
Labels background opcaity.
ecvColor::Rgbaf meshBackDiff
Default mesh diffuse color (back)
double zoomSpeed
Zoom speed (1.0 by default)
bool decimateCloudOnMove
Decimate clouds when moved.
ecvColor::Rgbub pointsDefaultCol
Default 3D points color.
bool colorScaleShowHistogram
Color scale option: show histogram next to color ramp.