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