diff --git a/qglengine/globject.cpp b/qglengine/globject.cpp index 42d1a19..0593938 100644 --- a/qglengine/globject.cpp +++ b/qglengine/globject.cpp @@ -297,6 +297,7 @@ void ObjectBase::setMatrix(const QMatrix4x4 & t) { //mat_ = t; //pos_ = mat_.column(3).toVector3D(); //mat_.setColumn(3, QVector4D(0., 0., 0., 1.)); + raw_matrix = false; trans.setMatrix(t); buildTransform(); } diff --git a/qglengine/globject.h b/qglengine/globject.h index 0e367cc..cd5fce8 100644 --- a/qglengine/globject.h +++ b/qglengine/globject.h @@ -248,6 +248,7 @@ public: void setDirection(const QVector3D & d); void setDirection(double x, double y, double z) {setDirection(QVector3D(x, y, z));} double distance() const {return aim_dist;} + void setDistance(double d) {aim_dist = d;} void flyCloser(double s); void flyFarer(double s); void flyToDistance(double d); diff --git a/qglengine/mouse_controller.cpp b/qglengine/mouse_controller.cpp index 4d8c6fa..4303d96 100644 --- a/qglengine/mouse_controller.cpp +++ b/qglengine/mouse_controller.cpp @@ -179,6 +179,7 @@ void MouseController::mouseMoveEvent(QMouseEvent * e) { QCursor::setPos(view->mapToGlobal(downPos)); } else lastPos = e->pos(); + emit view->objectsPositionChanged(); return; } if (selecting_) { diff --git a/qglengine/qglview.cpp b/qglengine/qglview.cpp index 7c6a8dd..63f5b60 100644 --- a/qglengine/qglview.cpp +++ b/qglengine/qglview.cpp @@ -122,6 +122,26 @@ void QGLView::start(float freq) { } +QList QGLView::selectedLights() const { + QList ret; + QList sol = scene_->selectedObjects(); + foreach (ObjectBase * o, sol) + if (o->type() == ObjectBase::glLight) + ret << (Light*)o; + return ret; +} + + +QList QGLView::selectedCameras() const { + QList ret; + QList sol = scene_->selectedObjects(); + foreach (ObjectBase * o, sol) + if (o->type() == ObjectBase::glCamera) + ret << (Camera*)o; + return ret; +} + + void QGLView::resizeEvent(QResizeEvent * e) { renderLater(); diff --git a/qglengine/qglview.h b/qglengine/qglview.h index bd34f8b..1be8c78 100644 --- a/qglengine/qglview.h +++ b/qglengine/qglview.h @@ -149,7 +149,9 @@ public: void selectObject(ObjectBase * o, bool add_to_selection = false) {scene_->selectObject(o, add_to_selection);} void clearSelection() {scene_->clearSelection();} - QList selectedObjects() const {return scene_->selectedObjects();} + QList selectedObjects(bool top_only = false) const {return scene_->selectedObjects(top_only);} + QList selectedLights() const; + QList selectedCameras() const; ObjectBase * selectedObject() const {return scene_->selectedObject();} TextureManager * textureManager() {return renderer_.textures_manager;} @@ -267,6 +269,7 @@ signals: void hoverChanged(ObjectBase * cur, ObjectBase * prev); void selectionChanged(); + void objectsPositionChanged(); void materialsChanged(); void materialThumbnailCreated(Material*); void doubleClick(); diff --git a/qglengine/qglview_test/qglview_window.cpp b/qglengine/qglview_test/qglview_window.cpp index 5ad6ae2..a784b3e 100644 --- a/qglengine/qglview_test/qglview_window.cpp +++ b/qglengine/qglview_test/qglview_window.cpp @@ -88,6 +88,7 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView //connect(matEditor, SIGNAL(changed()), this, SLOT(materialChanged())); sceneTree->assignQGLView(view->view()); matEditor->assignQGLView(view->view()); + objectEditor->assignQGLView(view->view()); session.load(); @@ -153,7 +154,6 @@ void QGLViewWindow::loadFile(const QString & path, bool import) { void QGLViewWindow::selectionChanged() { ObjectBase * sel_obj = view->view()->selectedObject(); - //qDebug() << "selected" << (sel_obj ? sel_obj->name() : "0"); labelName->setText(sel_obj ? sel_obj->name() : ""); /**if (cur == 0) box->hide(); else { @@ -165,7 +165,6 @@ void QGLViewWindow::selectionChanged() { cur->addChild(box); box->show(); }*/ - objectEditor->setObject(sel_obj); //qDebug() << sel_obj->boundingBox(); } diff --git a/qglengine/qglview_test/qglview_window.ui b/qglengine/qglview_test/qglview_window.ui index 40e66f0..a0d11c9 100644 --- a/qglengine/qglview_test/qglview_window.ui +++ b/qglengine/qglview_test/qglview_window.ui @@ -57,7 +57,7 @@ - 0 + 1 @@ -67,7 +67,7 @@ - 0 + 1 diff --git a/qglengine/renderer.cpp b/qglengine/renderer.cpp index 2bd4dc2..92fd611 100644 --- a/qglengine/renderer.cpp +++ b/qglengine/renderer.cpp @@ -176,11 +176,13 @@ void Renderer::fillObjectsBuffer(const QList & ol, RenderPass pass void Renderer::renderObjects(Scene & scene, RenderPass pass) { QOpenGLExtraFunctions * f = view; QMapIterator > it(scene.geometries_used); + bool emit_pos_change = false; while (it.hasNext()) { it.next(); Mesh * mesh = it.key(); if (mesh->objects_changed) { mesh->objects_changed = false; + emit_pos_change = true; fillObjectsBuffer(it.value(), pass); mesh->loadObjects(f, cur_objects_); } @@ -191,6 +193,7 @@ void Renderer::renderObjects(Scene & scene, RenderPass pass) { } mesh->draw(f, it.value().size()); } + if (emit_pos_change) emit view->objectsPositionChanged(); } diff --git a/qglengine/widgets/object_editor.cpp b/qglengine/widgets/object_editor.cpp index 906a1bc..dd7a33f 100644 --- a/qglengine/widgets/object_editor.cpp +++ b/qglengine/widgets/object_editor.cpp @@ -18,19 +18,56 @@ #include "object_editor.h" #include "ui_object_editor.h" -#include "glcamera.h" +#include "qglview.h" +#include +#include ObjectEditor::ObjectEditor(QWidget * parent): QWidget(parent) { ui = new Ui::ObjectEditor(); ui->setupUi(this); + view = 0; active = true; - object = 0; - rmodes << ObjectBase::View << ObjectBase::Point << ObjectBase::Line << ObjectBase::Fill; - ui->groupLight->setEnabled(false); - ui->groupLight->setVisible(false); - ui->groupCamera->setEnabled(false); - ui->groupCamera->setVisible(false); + on_comboLightType_currentIndexChanged(0); + ui->widgetMain->setEnabled(false); + ui->labelAimDist->hide(); + ui->spinAimDist->hide(); + + QObjectList ol; + ol << ui->spinPosX << ui->spinPosY << ui->spinPosZ << + ui->spinRotationX << ui->spinRotationY << ui->spinRotationZ << + ui->spinScaleX << ui->spinScaleY << ui->spinScaleZ; + foreach (QObject * o, ol) + connect(o, SIGNAL(valueChanged(double)), this, SLOT(spinChanged(double))); + + ol.clear(); + ol << ui->spinLightIntensity << ui->spinLightDecayConst << ui->spinLightDecayLinear << + ui->spinLightDecayQuadratic << ui->spinLightAngleStart << ui->spinLightAngleEnd << + ui->spinAimDist; + foreach (QObject * o, ol) + connect(o, SIGNAL(valueChanged(double)), this, SLOT(spinLightChanged(double))); + + ol.clear(); + ol << ui->spinCameraFOV << ui->spinCameraDepthStart << ui->spinAimDist; + foreach (QObject * o, ol) + connect(o, SIGNAL(valueChanged(double)), this, SLOT(spinCameraChanged(double))); + + ol.clear(); + ol << ui->checkVisible << ui->checkCastShadows << ui->checkReceiveShadows << + ui->checkAcceptLight << ui->checkAcceptFog << + ui->checkCameraMirrorX << ui->checkCameraMirrorY; + foreach (QObject * o, ol) + connect(o, SIGNAL(toggled(bool)), this, SLOT(checkChanged(bool))); + +} + + +void ObjectEditor::assignQGLView(QGLView * v) { + view = v; + connect(view, SIGNAL(selectionChanged()), this, SLOT(selectionChanged())); + connect(view, SIGNAL(objectsPositionChanged()), this, SLOT(selectionChanged())); + connect(view->scene(), SIGNAL(treeChanged()), this, SLOT(selectionChanged())); + selectionChanged(); } @@ -46,38 +83,54 @@ void ObjectEditor::changeEvent(QEvent * e) { } -void ObjectEditor::setObject(ObjectBase * o) { - object = o; - if (object == 0) { - ui->groupLight->setEnabled(false); - ui->groupLight->setVisible(false); - ui->groupCamera->setEnabled(false); - ui->groupCamera->setVisible(false); +void ObjectEditor::selectionChanged() { + ui->widgetMain->setEnabled(false); + if (!view) return; + QList sol = view->selectedObjects(true); + if (sol.isEmpty()) { + ui->labelTitle->setText(tr("[No selected]")); return; } - ui->buttonDiscardRawMatrix->setEnabled(o->isRawMatrix()); + ui->widgetMain->setEnabled(true); + if (sol.size() == 1) { + setObject(sol[0]); + return; + } + bool hl = !view->selectedLights().isEmpty(), hc = !view->selectedCameras().isEmpty(); + ui->groupLight ->setVisible(hl); + ui->groupCamera ->setVisible(hc); + ui->labelAimDist->setVisible(hl || hc); + ui->spinAimDist ->setVisible(hl || hc); + ui->labelTitle->setText(tr("[%1 objects]").arg(sol.size())); +} + + +void ObjectEditor::setObject(ObjectBase * o) { active = false; - ui->spinPosX->setValue(object->posX()); - ui->spinPosY->setValue(object->posY()); - ui->spinPosZ->setValue(object->posZ()); - ui->spinRotationX->setValue(object->rotationX()); - ui->spinRotationY->setValue(object->rotationY()); - ui->spinRotationZ->setValue(object->rotationZ()); - ui->spinScaleX->setValue(object->scaleX()); - ui->spinScaleY->setValue(object->scaleY()); - ui->spinScaleZ->setValue(object->scaleZ()); - ui->spinLineWidth->setValue(object->lineWidth()); - ui->checkVisible->setChecked(object->isVisible()); - ui->checkAcceptLight->setChecked(object->isAcceptLight()); - ui->checkAcceptFog->setChecked(object->isAcceptFog()); - ui->checkCastShadows->setChecked(object->isCastShadows()); - ui->checkReceiveShadows->setChecked(object->isReceiveShadows()); - ui->comboRenderMode->setCurrentIndex(rmodes.indexOf(object->renderMode())); - ui->groupLight->setEnabled(object->type() == ObjectBase::glLight); - ui->groupLight->setVisible(object->type() == ObjectBase::glLight); - ui->buttonColor->setColor(object->color()); - if (object->type() == ObjectBase::glLight) { - Light * l = globject_cast(object); + ui->labelTitle->setText(o->name()); + ui->spinPosX->setValue(o->posX()); + ui->spinPosY->setValue(o->posY()); + ui->spinPosZ->setValue(o->posZ()); + ui->spinRotationX->setValue(o->rotationX()); + ui->spinRotationY->setValue(o->rotationY()); + ui->spinRotationZ->setValue(o->rotationZ()); + ui->spinScaleX->setValue(o->scaleX()); + ui->spinScaleY->setValue(o->scaleY()); + ui->spinScaleZ->setValue(o->scaleZ()); + ui->checkVisible->setChecked(o->isVisible()); + ui->checkAcceptLight->setChecked(o->isAcceptLight()); + ui->checkAcceptFog->setChecked(o->isAcceptFog()); + ui->checkCastShadows->setChecked(o->isCastShadows()); + ui->checkReceiveShadows->setChecked(o->isReceiveShadows()); + ui->buttonColor->setColor(o->color()); + bool is_l = o->type() == ObjectBase::glLight; + bool is_c = o->type() == ObjectBase::glCamera; + ui->labelAimDist->setVisible(is_l || is_c); + ui->spinAimDist ->setVisible(is_l || is_c); + ui->groupLight ->setVisible(is_l); + ui->groupCamera ->setVisible(is_c); + if (is_l) { + Light * l = globject_cast(o); //bool is_dir = l->light_type == Light::Directional, is_cone = l->light_type == Light::Cone; ui->comboLightType->setCurrentIndex(l->light_type); ui->spinLightIntensity->setValue(l->intensity); @@ -86,70 +139,21 @@ void ObjectEditor::setObject(ObjectBase * o) { ui->spinLightDecayQuadratic->setValue(l->decay_quadratic); ui->spinLightAngleStart->setValue(l->angle_start); ui->spinLightAngleEnd->setValue(l->angle_end); - ui->spinLightDirectionX->setValue(l->direction().x()); - ui->spinLightDirectionY->setValue(l->direction().y()); - ui->spinLightDirectionZ->setValue(l->direction().z()); + ui->spinAimDist->setValue(l->distance()); + on_comboLightType_currentIndexChanged(ui->comboLightType->currentIndex()); } - ui->groupCamera->setEnabled(object->type() == ObjectBase::glCamera); - ui->groupCamera->setVisible(object->type() == ObjectBase::glCamera); - if (object->type() == ObjectBase::glCamera) { - Camera * c = globject_cast(object); + if (is_c) { + Camera * c = globject_cast(o); ui->checkCameraMirrorX->setChecked(c->isMirrorX()); ui->checkCameraMirrorY->setChecked(c->isMirrorY()); ui->spinCameraFOV->setValue(c->FOV()); ui->spinCameraDepthStart->setValue(c->depthStart()); - ui->spinCameraDepthEnd->setValue(c->depthEnd()); + ui->spinAimDist->setValue(c->distance()); } active = true; } -void ObjectEditor::objectChanged() { - if (!active || object == 0) return; - if (!object->isRawMatrix()) { - 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()); - } - /*object->setLineWidth(ui->spinLineWidth->value()); - object->setVisible(ui->checkVisible->isChecked()); - object->setAcceptLight(ui->checkAcceptLight->isChecked()); - object->setAcceptFog(ui->checkAcceptFog->isChecked()); - object->setCastShadows(ui->checkCastShadows->isChecked()); - object->setReceiveShadows(ui->checkReceiveShadows->isChecked()); - object->setRenderMode((ObjectBase::RenderMode)rmodes[ui->comboRenderMode->currentIndex()]);*/ - object->setColor(ui->buttonColor->color()); - if (object->type() == ObjectBase::glLight) { - Light * l = globject_cast(object); - //bool is_dir = l->light_type == Light::Directional, is_cone = l->light_type == Light::Cone; - l->light_type = (Light::Type)ui->comboLightType->currentIndex(); - l->intensity = ui->spinLightIntensity->value(); - l->decay_const = ui->spinLightDecayConst->value(); - l->decay_linear = ui->spinLightDecayLinear->value(); - l->decay_quadratic = ui->spinLightDecayQuadratic->value(); - l->angle_start = ui->spinLightAngleStart->value(); - l->angle_end = ui->spinLightAngleEnd->value(); - //l->setDirection(QVector3D(ui->spinLightDirectionX->value(), ui->spinLightDirectionY->value(), ui->spinLightDirectionZ->value()).normalized()); - l->apply(); - } - if (object->type() == ObjectBase::glCamera) { - Camera * c = globject_cast(object); - c->setMirrorX(ui->checkCameraMirrorX->isChecked()); - c->setMirrorY(ui->checkCameraMirrorY->isChecked()); - c->setFOV(ui->spinCameraFOV->value()); - c->setDepthStart(ui->spinCameraDepthStart->value()); - c->setDepthEnd(ui->spinCameraDepthEnd->value()); - } - emit changed(); -} - - void ObjectEditor::on_spinLightAngleStart_valueChanged(double v) { if (ui->spinLightAngleEnd->value() < v) ui->spinLightAngleEnd->setValue(v); @@ -162,16 +166,93 @@ void ObjectEditor::on_spinLightAngleEnd_valueChanged(double v) { } -void ObjectEditor::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); +void ObjectEditor::on_comboLightType_currentIndexChanged(int index) { + bool ang = (index == Light::Cone); + ui->labelLightAngle ->setVisible(ang); + ui->labelLightAngleDash->setVisible(ang); + ui->spinLightAngleStart->setVisible(ang); + ui->spinLightAngleEnd ->setVisible(ang); + if (!view || !active) return; + QList sll = view->selectedLights(); + foreach (Light * o, sll) { + o->light_type = (Light::Type)index; + o->apply(); + } +} + + +void ObjectEditor::on_buttonColor_colorChanged(const QColor & v) { + if (!view || !active) return; + QList sol = view->selectedObjects(); + foreach (ObjectBase * o, sol) + o->setColor(v); + QList sll = view->selectedLights(); + foreach (Light * o, sll) + o->apply(); +} + + +void ObjectEditor::spinChanged(double v) { + if (!view || !active) return; + QList sol = view->selectedObjects(true); + QObject * s = sender(); + foreach (ObjectBase * o, sol) { + if (s == ui->spinPosX ) o->setPosX (v); + if (s == ui->spinPosY ) o->setPosY (v); + if (s == ui->spinPosZ ) o->setPosZ (v); + if (s == ui->spinRotationX) o->setRotationX(v); + if (s == ui->spinRotationY) o->setRotationY(v); + if (s == ui->spinRotationZ) o->setRotationZ(v); + if (s == ui->spinScaleX ) o->setScaleX (v); + if (s == ui->spinScaleY ) o->setScaleY (v); + if (s == ui->spinScaleZ ) o->setScaleZ (v); + } +} + + +void ObjectEditor::spinLightChanged(double v) { + if (!view || !active) return; + QList sll = view->selectedLights(); + QObject * s = sender(); + foreach (Light * o, sll) { + if (s == ui->spinLightIntensity ) o->intensity = v; + if (s == ui->spinLightDecayConst ) o->decay_const = v; + if (s == ui->spinLightDecayLinear ) o->decay_linear = v; + if (s == ui->spinLightDecayQuadratic) o->decay_quadratic = v; + if (s == ui->spinLightAngleStart ) o->angle_start = v; + if (s == ui->spinLightAngleEnd ) o->angle_end = v; + if (s == ui->spinAimDist ) o->setDistance(v); + o->apply(); + } +} + + +void ObjectEditor::spinCameraChanged(double v) { + if (!view || !active) return; + QList scl = view->selectedCameras(); + QObject * s = sender(); + foreach (Camera * o, scl) { + if (s == ui->spinCameraFOV ) o->setFOV (v); + if (s == ui->spinCameraDepthStart) o->setDepthStart(v); + if (s == ui->spinAimDist ) o->setDistance(v); + } +} + + +void ObjectEditor::checkChanged(bool v) { + if (!view || !active) return; + QList sol = view->selectedObjects(); + QList scl = view->selectedCameras(); + QObject * s = sender(); + foreach (ObjectBase * o, sol) { + if (s == ui->checkVisible ) o->setVisible (v); + if (s == ui->checkCastShadows ) o->setCastShadows (v); + if (s == ui->checkReceiveShadows) o->setReceiveShadows(v); + if (s == ui->checkAcceptLight ) o->setAcceptLight (v); + if (s == ui->checkAcceptFog ) o->setAcceptFog (v); + } + foreach (Camera * o, scl) { + if (s == ui->checkCameraMirrorX ) o->setMirrorX(v); + if (s == ui->checkCameraMirrorY ) o->setMirrorY(v); + } } diff --git a/qglengine/widgets/object_editor.h b/qglengine/widgets/object_editor.h index 615fbcf..2933152 100644 --- a/qglengine/widgets/object_editor.h +++ b/qglengine/widgets/object_editor.h @@ -32,22 +32,27 @@ class ObjectEditor: public QWidget public: explicit ObjectEditor(QWidget * parent = 0); - void setObject(ObjectBase * o); - ObjectBase * getObject() {return object;} + void assignQGLView(QGLView * v); protected: void changeEvent(QEvent * e); + void setObject(ObjectBase * o); Ui::ObjectEditor * ui; + QGLView * view; bool active; - ObjectBase * object; - QList rmodes; private slots: - void objectChanged(); + void selectionChanged(); void on_spinLightAngleStart_valueChanged(double v); void on_spinLightAngleEnd_valueChanged(double v); - void on_buttonDiscardRawMatrix_clicked(); + + void on_comboLightType_currentIndexChanged(int index); + void on_buttonColor_colorChanged(const QColor &v); + void spinChanged(double v); + void spinLightChanged(double v); + void spinCameraChanged(double v); + void checkChanged(bool v); signals: void changed(); diff --git a/qglengine/widgets/object_editor.ui b/qglengine/widgets/object_editor.ui index 0a6902f..f700871 100644 --- a/qglengine/widgets/object_editor.ui +++ b/qglengine/widgets/object_editor.ui @@ -6,670 +6,307 @@ 0 0 - 352 - 891 + 466 + 778 - - - QFormLayout::AllNonFixedFieldsGrow + + + 0 - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + 0 - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + 0 - - 2 + + 0 - - 2 - - - - - false + + + + + 0 + 0 + + + + font: bold; - Discard raw transform + [No selected] + + + Qt::AlignCenter - - - - Position X - - - - - - - -99999.000000000000000 - - - 99999.000000000000000 - - - - - - - Position Y - - - - - - - -99999.000000000000000 - - - 99999.000000000000000 - - - - - - - Position Z - - - - - - - -99999.000000000000000 - - - 99999.000000000000000 - - - - - - - Rotation X - - - - - - - -360.000000000000000 - - - 360.000000000000000 - - - ° - - - - - - - Rotation Y - - - - - - - -360.000000000000000 - - - 360.000000000000000 - - - ° - - - - - - - Rotation Z - - - - - - - -360.000000000000000 - - - 360.000000000000000 - - - ° - - - - - - - Scale X - - - - - - - 4 - - - -99999.000000000000000 - - - 99999.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Scale Y - - - - - - - 4 - - - -99999.000000000000000 - - - 99999.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Scale Z - - - - - - - 4 - - - -99999.000000000000000 - - - 99999.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Render mode - - - - - - - - View - - - - - Point - - - - - Line - - - - - Fill - - - - - - - - Visible - - - - - - - Accept light - - - - - - - Accept fog - - - - - - - Cast shadows - - - - - - - Receive shadows - - - - - - - Line width - - - - - - - 0.000000000000000 - - - 99999.000000000000000 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Light - - - - QFormLayout::AllNonFixedFieldsGrow - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - 2 - - + + + + 0 - - - - Type + + 0 + + + 0 + + + 0 + + + + + Position + + + + + + 0 + 0 + + + + X: + + + + + + + + + + + 0 + 0 + + + + Y: + + + + + + + + + + + 0 + 0 + + + + Z: + + + + + + + - - - - - Omni - - - - - Cone - - - - - Directional - - + + + + Rotation + + + + + + + 0 + 0 + + + + X: + + + + + + + -360.000000000000000 + + + 360.000000000000000 + + + ° + + + + + + + + 0 + 0 + + + + Y: + + + + + + + -360.000000000000000 + + + 360.000000000000000 + + + ° + + + + + + + + 0 + 0 + + + + Z: + + + + + + + -360.000000000000000 + + + 360.000000000000000 + + + ° + + + + - - - - Intensity + + + + Scale + + + + + + 0 + 0 + + + + X: + + + + + + + + + + + 0 + 0 + + + + Y: + + + + + + + + + + + 0 + 0 + + + + Z: + + + + + + + - - - - 0.000000000000000 - - - 128.000000000000000 - - - 1.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - true - - - - - - - Decay const - - - - - - - 0.000000000000000 - - - 64.000000000000000 - - - 1.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - true - - - - - - - Decay linear - - - - - - - 0.000000000000000 - - - 64.000000000000000 - - - 1.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - true - - - - - - - Decay quadratic - - - - - - - 0.000000000000000 - - - 64.000000000000000 - - - 1.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - true - - - - - - - Angle Start - - - - - - - 0.000000000000000 - - - 180.000000000000000 - - - 1 - - - 5.000000000000000 - - - 30.000000000000000 - - - ° - - - - - - - Angle End - - - - - - - 0.000000000000000 - - - 180.000000000000000 - - - 1 - - - 5.000000000000000 - - - 30.000000000000000 - - - ° - - - - - - - Direcion X - - - - - - - -1.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Direcion Y - - - - - - - -1.000000000000000 - - - 1.000000000000000 - - - 0.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - Direcion Z - - - - - - - -1.000000000000000 - - - 1.000000000000000 - - - 1.000000000000000 - - - 2 - - - 0.100000000000000 - - - 1.000000000000000 - - - - - - - - - - Camera - - - - - - Depth - - - - - - - 0 - - - - - 5 - - - 999999999.000000000000000 - - - 0.100000000000000 + + + + + + Accept fog - - + + + + Accept light + + + + + + + Visible + + + + + + + Cast shadows + + + + + + + Receive shadows + + + + + + + + + QFormLayout::AllNonFixedFieldsGrow + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + 0 @@ -677,88 +314,376 @@ - - + Color: - - - - 5 + + + + + + + + 0 + 0 + - - 999999999.000000000000000 - - - 1000.000000000000000 + + Aim distance: + + + - - - - FOV + + + + Light + + + QFormLayout::AllNonFixedFieldsGrow + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + Type: + + + + + + + + Omni + + + + + Cone + + + + + Directional + + + + + + + + Intensity: + + + + + + + 0.000000000000000 + + + 10.000000000000000 + + + 1.000000000000000 + + + 3 + + + 0.100000000000000 + + + 1.000000000000000 + + + true + + + 999.000000000000000 + + + + + + + Decay ^0: + + + + + + + 0.000000000000000 + + + 10.000000000000000 + + + 1.000000000000000 + + + 3 + + + 0.100000000000000 + + + 1.000000000000000 + + + true + + + 999.000000000000000 + + + + + + + Decay ^1: + + + + + + + 0.000000000000000 + + + 10.000000000000000 + + + 0.000000000000000 + + + 3 + + + 0.100000000000000 + + + 1.000000000000000 + + + true + + + 999.000000000000000 + + + + + + + Decay ^2: + + + + + + + 0.000000000000000 + + + 10.000000000000000 + + + 0.000000000000000 + + + 3 + + + 0.100000000000000 + + + 1.000000000000000 + + + true + + + 999.000000000000000 + + + + + + + Angle: + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + 0.000000000000000 + + + 180.000000000000000 + + + 1 + + + 5.000000000000000 + + + 30.000000000000000 + + + ° + + + + + + + - + + + + + + + 0.000000000000000 + + + 180.000000000000000 + + + 1 + + + 5.000000000000000 + + + 30.000000000000000 + + + ° + + + + + + + - - - - 1.000000000000000 - - - 179.000000000000000 - - - 60.000000000000000 - - - 2 - - - 5.000000000000000 - - - 30.000000000000000 - - - ° + + + + Camera + + + QFormLayout::AllNonFixedFieldsGrow + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + Depth start + + + + + + + FOV + + + + + + + 1.000000000000000 + + + 179.900000000000006 + + + 60.000000000000000 + + + 1 + + + 5.000000000000000 + + + 30.000000000000000 + + + ° + + + + + + + + + Mirror Y + + + + + + + Mirror X + + + + + + + + + 5 + + + 999999999.000000000000000 + + + 0.100000000000000 + + + + - - - - - - Mirror Y - - - - - - - Mirror X - - - - - - - - - Color - - - - - - @@ -772,522 +697,14 @@ QPushButton
colorbutton.h
+ + ScrollSpinBox + QWidget +
scroll_spin_box.h
+
- - - spinPosX - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 43 - - - 321 - 5 - - - - - spinPosY - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 75 - - - 320 - 36 - - - - - spinPosZ - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 97 - - - 321 - 61 - - - - - spinRotationX - valueChanged(double) - ObjectEditor - objectChanged() - - - 172 - 121 - - - 82 - 73 - - - - - spinRotationY - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 145 - - - 320 - 96 - - - - - spinRotationZ - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 169 - - - 321 - 125 - - - - - spinScaleX - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 191 - - - 321 - 150 - - - - - spinScaleY - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 213 - - - 321 - 175 - - - - - spinScaleZ - valueChanged(double) - ObjectEditor - objectChanged() - - - 319 - 235 - - - 321 - 200 - - - - - checkVisible - toggled(bool) - ObjectEditor - objectChanged() - - - 185 - 268 - - - 76 - 242 - - - - - checkAcceptLight - toggled(bool) - ObjectEditor - objectChanged() - - - 179 - 295 - - - 61 - 261 - - - - - checkAcceptFog - toggled(bool) - ObjectEditor - objectChanged() - - - 210 - 314 - - - 79 - 288 - - - - - checkCastShadows - toggled(bool) - ObjectEditor - objectChanged() - - - 283 - 333 - - - 55 - 310 - - - - - checkReceiveShadows - toggled(bool) - ObjectEditor - objectChanged() - - - 287 - 352 - - - 78 - 334 - - - - - spinLineWidth - valueChanged(double) - ObjectEditor - objectChanged() - - - 303 - 366 - - - 321 - 359 - - - - - comboRenderMode - currentIndexChanged(int) - ObjectEditor - objectChanged() - - - 319 - 257 - - - 321 - 228 - - - - - buttonColor - colorChanged(QColor) - ObjectEditor - objectChanged() - - - 309 - 422 - - - 320 - 393 - - - - - comboLightType - currentIndexChanged(int) - ObjectEditor - objectChanged() - - - 309 - 442 - - - 320 - 429 - - - - - spinLightIntensity - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 464 - - - 318 - 463 - - - - - spinLightDecayConst - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 486 - - - 320 - 489 - - - - - spinLightDecayLinear - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 508 - - - 318 - 517 - - - - - spinLightDecayQuadratic - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 530 - - - 325 - 543 - - - - - spinLightAngleStart - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 552 - - - 321 - 569 - - - - - spinLightAngleEnd - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 574 - - - 320 - 595 - - - - - spinLightDirectionX - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 596 - - - 332 - 607 - - - - - spinLightDirectionY - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 618 - - - 330 - 633 - - - - - spinLightDirectionZ - valueChanged(double) - ObjectEditor - objectChanged() - - - 309 - 640 - - - 326 - 659 - - - - - spinCameraDepthStart - valueChanged(double) - ObjectEditor - objectChanged() - - - 85 - 691 - - - 171 - 652 - - - - - spinCameraDepthEnd - valueChanged(double) - ObjectEditor - objectChanged() - - - 259 - 693 - - - 277 - 652 - - - - - spinCameraFOV - valueChanged(double) - ObjectEditor - objectChanged() - - - 145 - 719 - - - 324 - 696 - - - - - checkCameraMirrorX - clicked(bool) - ObjectEditor - objectChanged() - - - 129 - 753 - - - 323 - 758 - - - - - checkCameraMirrorY - clicked(bool) - ObjectEditor - objectChanged() - - - 194 - 782 - - - 328 - 785 - - - - + objectChanged()