ViewEditor and QGLView camera parameters now saved and applied only to default camera
This commit is contained in:
@@ -145,6 +145,8 @@ void QGLView::render() {
|
||||
emit glBeginPaint();
|
||||
glPointSize(settings.lineWidth);
|
||||
glLineWidth(settings.lineWidth);
|
||||
default_camera->setDepthStart(settings.depthStart);
|
||||
default_camera->setFOV(settings.FOV);
|
||||
QSizeF fbo_sz = renderer_.fbo_ds.size();
|
||||
renderer_.rend_selection.size_coeff = {double(fbo_sz.width()) / pixelWidth(), double(fbo_sz.height()) / pixelHeight()};
|
||||
renderer_.mouse_pos = mapFromGlobal(QCursor::pos()) * devicePixelRatio();
|
||||
|
||||
@@ -87,8 +87,8 @@ public:
|
||||
void start(float freq = 0.);
|
||||
|
||||
float lineWidth() const { return settings.lineWidth; }
|
||||
float FOV() const { return camera()->FOV(); }
|
||||
float depthStart() const { return camera()->depthStart(); }
|
||||
float FOV() const { return settings.FOV; }
|
||||
float depthStart() const { return settings.depthStart; }
|
||||
float currentFPS() const { return fps_; }
|
||||
float gamma() const { return settings.gamma; }
|
||||
bool autoExposure() const { return settings.autoExposure; }
|
||||
@@ -236,8 +236,8 @@ private slots:
|
||||
|
||||
public slots:
|
||||
void setLineWidth(const float & arg) { settings.lineWidth = arg; }
|
||||
void setFOV(const float & arg) { camera()->setFOV(arg); }
|
||||
void setDepthStart(const float & arg) { camera()->setDepthStart(arg); }
|
||||
void setFOV(const float & arg) { settings.FOV = arg; }
|
||||
void setDepthStart(const float & arg) { settings.depthStart = arg; }
|
||||
void setGamma(const float & arg) { settings.gamma = arg; }
|
||||
void setAutoExposure(bool arg) { settings.autoExposure = arg; }
|
||||
void setEnvironmentMapFile(QString file) {
|
||||
|
||||
@@ -51,6 +51,9 @@ struct QGLENGINE_CORE_EXPORT QGLViewSettings {
|
||||
|
||||
ID(17) float gamma = 1.f;
|
||||
ID(18) bool autoExposure = false;
|
||||
|
||||
ID(19) float depthStart = 0.1f;
|
||||
ID(20) float FOV = 60.f;
|
||||
};
|
||||
|
||||
#undef ID
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>-300</y>
|
||||
<y>-306</y>
|
||||
<width>444</width>
|
||||
<height>1100</height>
|
||||
</rect>
|
||||
@@ -847,6 +847,9 @@
|
||||
<property name="maximum">
|
||||
<double>999999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
@@ -874,7 +877,7 @@
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>5.000000000000000</double>
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<double>30.000000000000000</double>
|
||||
@@ -966,6 +969,9 @@
|
||||
<class>ColorButton</class>
|
||||
<extends>QPushButton</extends>
|
||||
<header>colorbutton.h</header>
|
||||
<slots>
|
||||
<signal>colorChanged(QColor)</signal>
|
||||
</slots>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ScrollSpinBox</class>
|
||||
|
||||
@@ -443,8 +443,11 @@
|
||||
<property name="maximum">
|
||||
<double>999999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.010000000000000</double>
|
||||
</property>
|
||||
<property name="value">
|
||||
<double>1.000000000000000</double>
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user