git-svn-id: svn://db.shs.com.ru/libs@447 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -143,6 +143,7 @@ public:
|
|||||||
|
|
||||||
QMatrix4x4 transform() {return mat_;}
|
QMatrix4x4 transform() {return mat_;}
|
||||||
void setTransform(const QMatrix4x4 & t);
|
void setTransform(const QMatrix4x4 & t);
|
||||||
|
bool isRawMatrix() {return raw_matrix;}
|
||||||
|
|
||||||
bool isAcceptLight() const {return accept_light;}
|
bool isAcceptLight() const {return accept_light;}
|
||||||
void setAcceptLight(bool yes) {accept_light = yes;}
|
void setAcceptLight(bool yes) {accept_light = yes;}
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ void GLObjectEditor::setObject(GLObjectBase * o) {
|
|||||||
ui->groupLight->setEnabled(false);
|
ui->groupLight->setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ui->buttonDiscardRawMatrix->setEnabled(o->isRawMatrix());
|
||||||
active = false;
|
active = false;
|
||||||
ui->spinPosX->setValue(object->posX());
|
ui->spinPosX->setValue(object->posX());
|
||||||
ui->spinPosY->setValue(object->posY());
|
ui->spinPosY->setValue(object->posY());
|
||||||
@@ -88,6 +89,7 @@ void GLObjectEditor::setObject(GLObjectBase * o) {
|
|||||||
|
|
||||||
void GLObjectEditor::objectChanged() {
|
void GLObjectEditor::objectChanged() {
|
||||||
if (!active || object == 0) return;
|
if (!active || object == 0) return;
|
||||||
|
if (!object->isRawMatrix()) {
|
||||||
object->setPosX(ui->spinPosX->value());
|
object->setPosX(ui->spinPosX->value());
|
||||||
object->setPosY(ui->spinPosY->value());
|
object->setPosY(ui->spinPosY->value());
|
||||||
object->setPosZ(ui->spinPosZ->value());
|
object->setPosZ(ui->spinPosZ->value());
|
||||||
@@ -97,6 +99,7 @@ void GLObjectEditor::objectChanged() {
|
|||||||
object->setScaleX(ui->spinScaleX->value());
|
object->setScaleX(ui->spinScaleX->value());
|
||||||
object->setScaleY(ui->spinScaleY->value());
|
object->setScaleY(ui->spinScaleY->value());
|
||||||
object->setScaleZ(ui->spinScaleZ->value());
|
object->setScaleZ(ui->spinScaleZ->value());
|
||||||
|
}
|
||||||
object->setLineWidth(ui->spinLineWidth->value());
|
object->setLineWidth(ui->spinLineWidth->value());
|
||||||
object->setVisible(ui->checkVisible->isChecked());
|
object->setVisible(ui->checkVisible->isChecked());
|
||||||
object->setAcceptLight(ui->checkAcceptLight->isChecked());
|
object->setAcceptLight(ui->checkAcceptLight->isChecked());
|
||||||
@@ -131,3 +134,18 @@ void GLObjectEditor::on_spinLightAngleEnd_valueChanged(double v) {
|
|||||||
if (ui->spinLightAngleStart->value() > v)
|
if (ui->spinLightAngleStart->value() > v)
|
||||||
ui->spinLightAngleStart->setValue(v);
|
ui->spinLightAngleStart->setValue(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void GLObjectEditor::on_buttonDiscardRawMatrix_clicked() {
|
||||||
|
if (!active || !object) return;
|
||||||
|
object->setPosX(ui->spinPosX->value());
|
||||||
|
object->setPosY(ui->spinPosY->value());
|
||||||
|
object->setPosZ(ui->spinPosZ->value());
|
||||||
|
object->setRotationX(ui->spinRotationX->value());
|
||||||
|
object->setRotationY(ui->spinRotationY->value());
|
||||||
|
object->setRotationZ(ui->spinRotationZ->value());
|
||||||
|
object->setScaleX(ui->spinScaleX->value());
|
||||||
|
object->setScaleY(ui->spinScaleY->value());
|
||||||
|
object->setScaleZ(ui->spinScaleZ->value());
|
||||||
|
ui->buttonDiscardRawMatrix->setEnabled(false);
|
||||||
|
}
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ private slots:
|
|||||||
void objectChanged();
|
void objectChanged();
|
||||||
void on_spinLightAngleStart_valueChanged(double v);
|
void on_spinLightAngleStart_valueChanged(double v);
|
||||||
void on_spinLightAngleEnd_valueChanged(double v);
|
void on_spinLightAngleEnd_valueChanged(double v);
|
||||||
|
void on_buttonDiscardRawMatrix_clicked();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void changed();
|
void changed();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>329</width>
|
<width>329</width>
|
||||||
<height>681</height>
|
<height>707</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QFormLayout" name="formLayout">
|
||||||
@@ -26,14 +26,14 @@
|
|||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>2</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="label">
|
<widget class="QLabel" name="label">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position X</string>
|
<string>Position X</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinPosX">
|
<widget class="QDoubleSpinBox" name="spinPosX">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-99999.000000000000000</double>
|
<double>-99999.000000000000000</double>
|
||||||
@@ -43,14 +43,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position Y</string>
|
<string>Position Y</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinPosY">
|
<widget class="QDoubleSpinBox" name="spinPosY">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-99999.000000000000000</double>
|
<double>-99999.000000000000000</double>
|
||||||
@@ -60,14 +60,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Position Z</string>
|
<string>Position Z</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinPosZ">
|
<widget class="QDoubleSpinBox" name="spinPosZ">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-99999.000000000000000</double>
|
<double>-99999.000000000000000</double>
|
||||||
@@ -77,28 +77,28 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0">
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="label_4">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rotation X</string>
|
<string>Rotation X</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="0">
|
||||||
<widget class="QLabel" name="label_5">
|
<widget class="QLabel" name="label_5">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rotation Y</string>
|
<string>Rotation Y</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="0">
|
<item row="6" column="0">
|
||||||
<widget class="QLabel" name="label_6">
|
<widget class="QLabel" name="label_6">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rotation Z</string>
|
<string>Rotation Z</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="SpinSlider" name="spinRotationX">
|
<widget class="SpinSlider" name="spinRotationX">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-180.000000000000000</double>
|
<double>-180.000000000000000</double>
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="1">
|
||||||
<widget class="SpinSlider" name="spinRotationY">
|
<widget class="SpinSlider" name="spinRotationY">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-180.000000000000000</double>
|
<double>-180.000000000000000</double>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="5" column="1">
|
<item row="6" column="1">
|
||||||
<widget class="SpinSlider" name="spinRotationZ">
|
<widget class="SpinSlider" name="spinRotationZ">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>-180.000000000000000</double>
|
<double>-180.000000000000000</double>
|
||||||
@@ -128,28 +128,28 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="7" column="0">
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_7">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Scale X</string>
|
<string>Scale X</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="8" column="0">
|
||||||
<widget class="QLabel" name="label_8">
|
<widget class="QLabel" name="label_8">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Scale Y</string>
|
<string>Scale Y</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="0">
|
<item row="9" column="0">
|
||||||
<widget class="QLabel" name="label_9">
|
<widget class="QLabel" name="label_9">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Scale Z</string>
|
<string>Scale Z</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="7" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinScaleX">
|
<widget class="QDoubleSpinBox" name="spinScaleX">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
@@ -168,7 +168,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="8" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinScaleY">
|
<widget class="QDoubleSpinBox" name="spinScaleY">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="8" column="1">
|
<item row="9" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinScaleZ">
|
<widget class="QDoubleSpinBox" name="spinScaleZ">
|
||||||
<property name="decimals">
|
<property name="decimals">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
@@ -206,14 +206,14 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="10" column="0">
|
||||||
<widget class="QLabel" name="label_10">
|
<widget class="QLabel" name="label_10">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Render mode</string>
|
<string>Render mode</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="1">
|
<item row="10" column="1">
|
||||||
<widget class="QComboBox" name="comboRenderMode">
|
<widget class="QComboBox" name="comboRenderMode">
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -237,35 +237,35 @@
|
|||||||
</item>
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="10" column="1">
|
<item row="11" column="1">
|
||||||
<widget class="QCheckBox" name="checkVisible">
|
<widget class="QCheckBox" name="checkVisible">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Visible</string>
|
<string>Visible</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="11" column="1">
|
<item row="12" column="1">
|
||||||
<widget class="QCheckBox" name="checkAcceptLight">
|
<widget class="QCheckBox" name="checkAcceptLight">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Accept light</string>
|
<string>Accept light</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="12" column="1">
|
<item row="13" column="1">
|
||||||
<widget class="QCheckBox" name="checkAcceptFog">
|
<widget class="QCheckBox" name="checkAcceptFog">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Accept fog</string>
|
<string>Accept fog</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="0">
|
<item row="16" column="0">
|
||||||
<widget class="QLabel" name="label_11">
|
<widget class="QLabel" name="label_11">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Line width</string>
|
<string>Line width</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="15" column="1">
|
<item row="16" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinLineWidth">
|
<widget class="QDoubleSpinBox" name="spinLineWidth">
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>0.000000000000000</double>
|
<double>0.000000000000000</double>
|
||||||
@@ -281,21 +281,21 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="13" column="1">
|
<item row="14" column="1">
|
||||||
<widget class="QCheckBox" name="checkCastShadows">
|
<widget class="QCheckBox" name="checkCastShadows">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Cast shadows</string>
|
<string>Cast shadows</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="14" column="1">
|
<item row="15" column="1">
|
||||||
<widget class="QCheckBox" name="checkReceiveShadows">
|
<widget class="QCheckBox" name="checkReceiveShadows">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Receive shadows</string>
|
<string>Receive shadows</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="16" column="0" colspan="2">
|
<item row="17" column="0" colspan="2">
|
||||||
<widget class="QGroupBox" name="groupLight">
|
<widget class="QGroupBox" name="groupLight">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Light</string>
|
<string>Light</string>
|
||||||
@@ -622,6 +622,16 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="buttonDiscardRawMatrix">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Discard raw transform</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
|
|||||||
Reference in New Issue
Block a user