code format
This commit is contained in:
@@ -16,10 +16,11 @@
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "qglview_window.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include "qglview_window.h"
|
||||
|
||||
|
||||
int main(int argc, char ** argv) {
|
||||
@@ -29,7 +30,7 @@ int main(int argc, char ** argv) {
|
||||
w.show();
|
||||
QStringList al(a.arguments());
|
||||
al.pop_front();
|
||||
foreach (QString s, al)
|
||||
foreach(QString s, al)
|
||||
w.loadFile(s);
|
||||
return a.exec();
|
||||
}
|
||||
|
||||
@@ -17,12 +17,14 @@
|
||||
*/
|
||||
|
||||
#include "qglview_window.h"
|
||||
#include "loader_qgl.h"
|
||||
#include "loader_ase.h"
|
||||
|
||||
#include "loader_3ds.h"
|
||||
#include "loader_obj.h"
|
||||
#include "loader_ase.h"
|
||||
#include "loader_dae.h"
|
||||
#include "loader_obj.h"
|
||||
#include "loader_qgl.h"
|
||||
#include "qad_types.h"
|
||||
|
||||
#include <QGraphicsRectItem>
|
||||
#include <QImageReader>
|
||||
#include <QMessageBox>
|
||||
@@ -32,18 +34,18 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView
|
||||
setupUi(this);
|
||||
session.setFile("session_qglview_test.conf");
|
||||
session.addEntry(this);
|
||||
icon_geo = QIcon(":/icons/type-geo.png");
|
||||
icon_geo = QIcon(":/icons/type-geo.png");
|
||||
icon_camera = QIcon(":/icons/type-camera.png");
|
||||
icon_light = QIcon(":/icons/type-light.png");
|
||||
icon_light = QIcon(":/icons/type-light.png");
|
||||
QAction * a = new QAction(QIcon(":/icons/edit-delete.png"), "Remove");
|
||||
connect(a, SIGNAL(triggered()), this, SLOT(removeObjects()));
|
||||
treeObjects->addAction(a);
|
||||
spinViewLineWidth->setValue(lineThickness()*2);
|
||||
|
||||
spinViewLineWidth->setValue(lineThickness() * 2);
|
||||
|
||||
sel_obj = nullptr;
|
||||
view->view()->camera()->setAim(QVector3D());
|
||||
view->view()->camera()->setPos(QVector3D(2, 2, 2));
|
||||
// view->setFrameShape(QFrame::NoFrame);
|
||||
// view->setFrameShape(QFrame::NoFrame);
|
||||
view->view()->setRenderer(new RendererSimple(view->view()));
|
||||
view->view()->setMouseRotateEnabled(true);
|
||||
view->view()->setMouseSelectionEnabled(true);
|
||||
@@ -95,30 +97,36 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView
|
||||
|
||||
axis = new GLObjectBase();
|
||||
GLObjectBase * obj;
|
||||
float al = 1.;
|
||||
obj = new GLPrimitiveLine(QVector3D(0, 0, -al), QVector3D(0, 0, al));
|
||||
obj->material().color_diffuse = Qt::darkBlue; obj->setAcceptLight(false);
|
||||
float al = 1.;
|
||||
obj = new GLPrimitiveLine(QVector3D(0, 0, -al), QVector3D(0, 0, al));
|
||||
obj->material().color_diffuse = Qt::darkBlue;
|
||||
obj->setAcceptLight(false);
|
||||
axis->addChild(obj);
|
||||
obj = new GLPrimitiveLine(QVector3D(-al, 0, 0), QVector3D(al, 0, 0));
|
||||
obj->material().color_diffuse = Qt::darkRed; obj->setAcceptLight(false);
|
||||
obj = new GLPrimitiveLine(QVector3D(-al, 0, 0), QVector3D(al, 0, 0));
|
||||
obj->material().color_diffuse = Qt::darkRed;
|
||||
obj->setAcceptLight(false);
|
||||
axis->addChild(obj);
|
||||
obj = new GLPrimitiveLine(QVector3D(0, -al, 0), QVector3D(0, al, 0));
|
||||
obj->material().color_diffuse = Qt::darkGreen; obj->setAcceptLight(false);
|
||||
obj = new GLPrimitiveLine(QVector3D(0, -al, 0), QVector3D(0, al, 0));
|
||||
obj->material().color_diffuse = Qt::darkGreen;
|
||||
obj->setAcceptLight(false);
|
||||
axis->addChild(obj);
|
||||
view->view()->addObject(axis);
|
||||
|
||||
cam_light = new Light();
|
||||
cam_light = new Light();
|
||||
cam_light->intensity = 0.5;
|
||||
cam_light->setName("Camera_Light");
|
||||
view->view()->camera()->addChild(cam_light);
|
||||
view->view()->start(-1);
|
||||
startTimer(1000/60);
|
||||
startTimer(1000 / 60);
|
||||
|
||||
connect(view->view(), SIGNAL(selectionChanged(GLObjectBase*,GLObjectBase*)), this, SLOT(selectionChanged(GLObjectBase*,GLObjectBase*)));
|
||||
connect(view->view(),
|
||||
SIGNAL(selectionChanged(GLObjectBase *, GLObjectBase *)),
|
||||
this,
|
||||
SLOT(selectionChanged(GLObjectBase *, GLObjectBase *)));
|
||||
connect(view->view(), SIGNAL(keyEvent(Qt::Key, Qt::KeyboardModifiers)), this, SLOT(view_keyEvent(Qt::Key, Qt::KeyboardModifiers)));
|
||||
connect(matEditor, SIGNAL(changed()), this, SLOT(materialChanged()));
|
||||
|
||||
//view->view()->addObject(&partsys);
|
||||
// view->view()->addObject(&partsys);
|
||||
partsys.material().color_diffuse = Qt::red;
|
||||
treeProps->assignObject(&partsys);
|
||||
session.load();
|
||||
@@ -127,7 +135,7 @@ QGLViewWindow::QGLViewWindow(QWidget * parent): QMainWindow(parent), Ui::QGLView
|
||||
|
||||
QGLViewWindow::~QGLViewWindow() {
|
||||
session.save();
|
||||
//delete ps;
|
||||
// delete ps;
|
||||
}
|
||||
|
||||
|
||||
@@ -140,9 +148,9 @@ void QGLViewWindow::changeEvent(QEvent * e) {
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::timerEvent(QTimerEvent * ) {
|
||||
//static double t = 0.;
|
||||
//cam_light->intensity = checkCameraLight->isChecked() ? 0.5 : 0.;
|
||||
void QGLViewWindow::timerEvent(QTimerEvent *) {
|
||||
// static double t = 0.;
|
||||
// cam_light->intensity = checkCameraLight->isChecked() ? 0.5 : 0.;
|
||||
cam_light->setVisible(checkCameraLight->isChecked());
|
||||
//((RendererSimple*)(view->view()->renderer()))->mpos = view->view()->mapFromGlobal(QCursor::pos());
|
||||
statusBar()->showMessage(QString("FPS: %1").arg(QString::number(view->view()->currentFPS(), 'f', 2)));
|
||||
@@ -179,7 +187,7 @@ void QGLViewWindow::makeObjetTree(const GLObjectBase * o, QTreeWidgetItem * ti)
|
||||
if (o == axis) return;
|
||||
for (int i = 0; i < o->childCount(); ++i) {
|
||||
const GLObjectBase * co = o->child(i);
|
||||
QTreeWidgetItem * ci = new QTreeWidgetItem(ti);
|
||||
QTreeWidgetItem * ci = new QTreeWidgetItem(ti);
|
||||
ci->setText(0, co->name());
|
||||
ci->setData(0, Qt::UserRole, quintptr(co));
|
||||
switch (co->type()) {
|
||||
@@ -195,22 +203,22 @@ void QGLViewWindow::makeObjetTree(const GLObjectBase * o, QTreeWidgetItem * ti)
|
||||
|
||||
void QGLViewWindow::selectionChanged(GLObjectBase * cur, GLObjectBase *) {
|
||||
sel_obj = cur;
|
||||
//qDebug() << "selected" << (cur != 0 ? cur->name() : "0");
|
||||
// qDebug() << "selected" << (cur != 0 ? cur->name() : "0");
|
||||
labelName->setText(cur != nullptr ? cur->name() : "");
|
||||
/**if (cur == 0) box->hide();
|
||||
else {
|
||||
box->setScale(cur->boundingBox().size());
|
||||
box->setPos(cur->boundingBox().pos());
|
||||
Box3D b = cur->boundingBox().movedTo(-cur->boundingBox().center());
|
||||
b.z = -b.z - b.height;
|
||||
ps->setEmitterRect(b);
|
||||
cur->addChild(box);
|
||||
box->show();
|
||||
box->setScale(cur->boundingBox().size());
|
||||
box->setPos(cur->boundingBox().pos());
|
||||
Box3D b = cur->boundingBox().movedTo(-cur->boundingBox().center());
|
||||
b.z = -b.z - b.height;
|
||||
ps->setEmitterRect(b);
|
||||
cur->addChild(box);
|
||||
box->show();
|
||||
}*/
|
||||
objectEditor->setObject(sel_obj);
|
||||
if (sel_obj == nullptr) return;
|
||||
matEditor->setMaterial(sel_obj->material());
|
||||
//qDebug() << sel_obj->boundingBox();
|
||||
// qDebug() << sel_obj->boundingBox();
|
||||
}
|
||||
|
||||
|
||||
@@ -224,8 +232,10 @@ void QGLViewWindow::on_comboRenderer_currentIndexChanged(int val) {
|
||||
GLRendererBase * pr = nullptr;
|
||||
switch (val) {
|
||||
case 0: view->view()->setRenderer(new RendererSimple(view->view()), &pr); break;
|
||||
case 1: view->view()->setRenderer(new RendererDeferredShading(view->view()), &pr); break;
|
||||
//case 2: view->view()->setRenderer(new RendererRT(view), &pr); break;
|
||||
case 1:
|
||||
view->view()->setRenderer(new RendererDeferredShading(view->view()), &pr);
|
||||
break;
|
||||
// case 2: view->view()->setRenderer(new RendererRT(view), &pr); break;
|
||||
}
|
||||
if (pr != nullptr) delete pr;
|
||||
}
|
||||
@@ -240,15 +250,18 @@ void QGLViewWindow::on_actionReset_triggered() {
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionImport_triggered() {
|
||||
QStringList fl = QFileDialog::getOpenFileNames(this, "Select files", prev_path, "Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
|
||||
"QGLView(*.qgl);;"
|
||||
"Ascii Scene Export(*.ase);;"
|
||||
"3D Studio(*.3ds);;"
|
||||
"Wavefront OBJ(*.obj);;"
|
||||
"Collada(*.dae)");
|
||||
QStringList fl = QFileDialog::getOpenFileNames(this,
|
||||
"Select files",
|
||||
prev_path,
|
||||
"Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
|
||||
"QGLView(*.qgl);;"
|
||||
"Ascii Scene Export(*.ase);;"
|
||||
"3D Studio(*.3ds);;"
|
||||
"Wavefront OBJ(*.obj);;"
|
||||
"Collada(*.dae)");
|
||||
if (fl.isEmpty()) return;
|
||||
prev_path = fl.back();
|
||||
foreach (QString f, fl)
|
||||
foreach(QString f, fl)
|
||||
importFile(f);
|
||||
}
|
||||
|
||||
@@ -256,8 +269,7 @@ void QGLViewWindow::on_actionImport_triggered() {
|
||||
void QGLViewWindow::on_actionSave_triggered() {
|
||||
QString f = QFileDialog::getSaveFileName(this, "Select file", prev_path, "QGLView(*.qgl)");
|
||||
if (f.isEmpty()) return;
|
||||
if (f.right(4).toLower() != ".qgl")
|
||||
f += ".qgl";
|
||||
if (f.right(4).toLower() != ".qgl") f += ".qgl";
|
||||
prev_path = f;
|
||||
view->view()->removeObject(axis);
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
@@ -271,8 +283,7 @@ void QGLViewWindow::on_actionSaveSelected_triggered() {
|
||||
if (!sel_obj) return;
|
||||
QString f = QFileDialog::getSaveFileName(this, "Select file", prev_path, "QGLView(*.qgl)");
|
||||
if (f.isEmpty()) return;
|
||||
if (f.right(4).toLower() != ".qgl")
|
||||
f += ".qgl";
|
||||
if (f.right(4).toLower() != ".qgl") f += ".qgl";
|
||||
prev_path = f;
|
||||
QApplication::setOverrideCursor(Qt::WaitCursor);
|
||||
saveToQGLFile(f, sel_obj);
|
||||
@@ -281,12 +292,15 @@ void QGLViewWindow::on_actionSaveSelected_triggered() {
|
||||
|
||||
|
||||
void QGLViewWindow::on_actionOpen_triggered() {
|
||||
QString f = QFileDialog::getOpenFileName(this, "Select file", prev_path, "Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
|
||||
"QGLView(*.qgl);;"
|
||||
"Ascii Scene Export(*.ase);;"
|
||||
"3D Studio(*.3ds);;"
|
||||
"Wavefront OBJ(*.obj);;"
|
||||
"Collada(*.dae)");
|
||||
QString f = QFileDialog::getOpenFileName(this,
|
||||
"Select file",
|
||||
prev_path,
|
||||
"Supported types(*.qgl *.ase *.3ds *.obj *.dae);;"
|
||||
"QGLView(*.qgl);;"
|
||||
"Ascii Scene Export(*.ase);;"
|
||||
"3D Studio(*.3ds);;"
|
||||
"Wavefront OBJ(*.obj);;"
|
||||
"Collada(*.dae)");
|
||||
if (f.isEmpty()) return;
|
||||
prev_path = f;
|
||||
importFile(f);
|
||||
@@ -294,10 +308,9 @@ void QGLViewWindow::on_actionOpen_triggered() {
|
||||
|
||||
|
||||
void QGLViewWindow::view_keyEvent(Qt::Key k, Qt::KeyboardModifiers m) {
|
||||
//qDebug() << k;
|
||||
// qDebug() << k;
|
||||
double spd = 0.2;
|
||||
if (m.testFlag(Qt::ShiftModifier))
|
||||
spd = 0.5;
|
||||
if (m.testFlag(Qt::ShiftModifier)) spd = 0.5;
|
||||
switch (k) {
|
||||
case Qt::Key_W: view->view()->camera()->moveForward(spd); break;
|
||||
case Qt::Key_S: view->view()->camera()->moveBackward(spd); break;
|
||||
@@ -309,17 +322,16 @@ void QGLViewWindow::view_keyEvent(Qt::Key k, Qt::KeyboardModifiers m) {
|
||||
|
||||
|
||||
void QGLViewWindow::on_treeObjects_itemClicked(QTreeWidgetItem * ti, int) {
|
||||
((GLObjectBase*)(ti->data(0, Qt::UserRole).toULongLong()))->select();
|
||||
//qDebug() << ((GLObjectBase*)(ti->data(0, Qt::UserRole).toULongLong()))->type();
|
||||
if (sel_obj->type() == GLObjectBase::glCamera)
|
||||
view->view()->setCamera((Camera*)sel_obj);
|
||||
((GLObjectBase *)(ti->data(0, Qt::UserRole).toULongLong()))->select();
|
||||
// qDebug() << ((GLObjectBase*)(ti->data(0, Qt::UserRole).toULongLong()))->type();
|
||||
if (sel_obj->type() == GLObjectBase::glCamera) view->view()->setCamera((Camera *)sel_obj);
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::removeObjects() {
|
||||
QList<QTreeWidgetItem*> sil = treeObjects->selectedItems();
|
||||
foreach (QTreeWidgetItem * i, sil) {
|
||||
GLObjectBase * o = (GLObjectBase*)(i->data(0, Qt::UserRole).toULongLong());
|
||||
QList<QTreeWidgetItem *> sil = treeObjects->selectedItems();
|
||||
foreach(QTreeWidgetItem * i, sil) {
|
||||
GLObjectBase * o = (GLObjectBase *)(i->data(0, Qt::UserRole).toULongLong());
|
||||
delete o;
|
||||
}
|
||||
qDeleteAll(sil);
|
||||
@@ -334,20 +346,19 @@ void QGLViewWindow::objectsTreeChanged() {
|
||||
|
||||
|
||||
void QGLViewWindow::on_pushButton_clicked() {
|
||||
//view->view()->removeLight(view->view()->lightsCount() - 1);
|
||||
//setWindowTitle(QString::number(view->view()->lightsCount()));
|
||||
// view->view()->removeLight(view->view()->lightsCount() - 1);
|
||||
// setWindowTitle(QString::number(view->view()->lightsCount()));
|
||||
QVector3D wp = view->view()->light(0)->worldPos();
|
||||
view->view()->camera()->setPos(wp);
|
||||
view->view()->camera()->setAim(wp + (view->view()->light(0)->worldTransform() * QVector4D(view->view()->light(0)->direction)).toVector3D()*100);
|
||||
view->view()->camera()->setAim(
|
||||
wp + (view->view()->light(0)->worldTransform() * QVector4D(view->view()->light(0)->direction)).toVector3D() * 100);
|
||||
}
|
||||
|
||||
|
||||
void QGLViewWindow::on_pushButton_3_clicked() {
|
||||
QList<GLObjectBase * > ol = view->view()->objects(true);
|
||||
QList<GLObjectBase *> ol = view->view()->objects(true);
|
||||
qDebug() << ol.size();
|
||||
foreach (GLObjectBase * i, ol) {
|
||||
foreach(GLObjectBase * i, ol) {
|
||||
i->VBO().rebuffer();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -19,32 +19,35 @@
|
||||
#ifndef QGLVIEWWINDOW_H
|
||||
#define QGLVIEWWINDOW_H
|
||||
|
||||
#include <QTranslator>
|
||||
#include <QInputDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QColorDialog>
|
||||
#include <QCloseEvent>
|
||||
#include <QClipboard>
|
||||
#include <QRadioButton>
|
||||
#include <QUrl>
|
||||
#include <QThread>
|
||||
#include <QTime>
|
||||
#include <QSplitter>
|
||||
#include "ui_qglview_window.h"
|
||||
#include "loader_3ds.h"
|
||||
#include "loader_ase.h"
|
||||
#include "renderer_simple.h"
|
||||
#include "renderer_deferred_shading.h"
|
||||
#include "renderer_simple.h"
|
||||
#include "session_manager.h"
|
||||
//#include "renderer_rt.h"
|
||||
#include "ui_qglview_window.h"
|
||||
|
||||
#include <QClipboard>
|
||||
#include <QCloseEvent>
|
||||
#include <QColorDialog>
|
||||
#include <QFileDialog>
|
||||
#include <QInputDialog>
|
||||
#include <QRadioButton>
|
||||
#include <QSplitter>
|
||||
#include <QThread>
|
||||
#include <QTime>
|
||||
#include <QTranslator>
|
||||
#include <QUrl>
|
||||
// #include "renderer_rt.h"
|
||||
#include "glparticles_system.h"
|
||||
#include "qglview.h"
|
||||
#include "ui_qglview_window.h"
|
||||
|
||||
|
||||
class QGLViewWindow: public QMainWindow, public Ui::QGLViewWindow
|
||||
{
|
||||
class QGLViewWindow
|
||||
: public QMainWindow
|
||||
, public Ui::QGLViewWindow {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QGLViewWindow(QWidget * parent = 0);
|
||||
~QGLViewWindow();
|
||||
@@ -54,7 +57,7 @@ public:
|
||||
private:
|
||||
// Qt`s overloaded
|
||||
void changeEvent(QEvent * e);
|
||||
void timerEvent(QTimerEvent * );
|
||||
void timerEvent(QTimerEvent *);
|
||||
|
||||
void importFile(const QString & path);
|
||||
void makeObjetTree(const GLObjectBase * o, QTreeWidgetItem * ti);
|
||||
@@ -62,7 +65,7 @@ private:
|
||||
QTranslator translator;
|
||||
QIcon icon_geo, icon_camera, icon_light;
|
||||
QString prev_path;
|
||||
GLObjectBase * sel_obj, * axis;
|
||||
GLObjectBase *sel_obj, *axis;
|
||||
Light * cam_light;
|
||||
GLPrimitiveCube * box;
|
||||
Material m;
|
||||
@@ -72,48 +75,51 @@ private:
|
||||
GLParticlesSystem partsys;
|
||||
|
||||
private slots:
|
||||
void on_spinFOV_valueChanged(double val) {view->view()->setFOV(val);}
|
||||
void on_spinDepthStart_valueChanged(double val) {view->view()->setDepthStart(val);}
|
||||
void on_spinDepthEnd_valueChanged(double val) {view->view()->setDepthEnd(val);}
|
||||
void on_spinFOV_valueChanged(double val) { view->view()->setFOV(val); }
|
||||
void on_spinDepthStart_valueChanged(double val) { view->view()->setDepthStart(val); }
|
||||
void on_spinDepthEnd_valueChanged(double val) { view->view()->setDepthEnd(val); }
|
||||
void on_comboRenderer_currentIndexChanged(int val);
|
||||
void on_comboViewRenderMode_currentIndexChanged(int val) {static int modes[] = {GL_POINT, GL_LINE, GL_FILL}; view->view()->setRenderMode((GLObjectBase::RenderMode)modes[val]);}
|
||||
void on_groupHoverHalo_clicked(bool val) {view->view()->setHoverHaloEnabled(val);}
|
||||
void on_groupSelectionHalo_clicked(bool val) {view->view()->setSelectionHaloEnabled(val);}
|
||||
void on_spinHoverHaloFill_valueChanged(double val) {view->view()->setHoverHaloFillAlpha(val);}
|
||||
void on_spinSelectionHaloFill_valueChanged(double val) {view->view()->setSelectionHaloFillAlpha(val);}
|
||||
void on_colorHoverHalo_colorChanged(QColor color) {view->view()->setHoverHaloColor(color);}
|
||||
void on_colorSelectionHalo_colorChanged(QColor color) {view->view()->setSelectionHaloColor(color);}
|
||||
void on_checkFXAA_clicked(bool val) {view->view()->setFeature(QGLView::qglFXAA, val);}
|
||||
void on_checkMSAA_clicked(bool val) {view->view()->setFeature(QGLView::qglMSAA, val);}
|
||||
void on_colorBack_colorChanged(QColor color) {view->view()->setBackColor(color);}
|
||||
void on_colorAmbient_colorChanged(QColor color) {view->view()->setAmbientColor(color);}
|
||||
void on_checkCameraOrbit_clicked(bool val) {view->view()->setCameraOrbit(val);}
|
||||
void on_spinViewLineWidth_valueChanged(double val) {view->view()->setLineWidth(val);}
|
||||
void on_comboViewRenderMode_currentIndexChanged(int val) {
|
||||
static int modes[] = {GL_POINT, GL_LINE, GL_FILL};
|
||||
view->view()->setRenderMode((GLObjectBase::RenderMode)modes[val]);
|
||||
}
|
||||
void on_groupHoverHalo_clicked(bool val) { view->view()->setHoverHaloEnabled(val); }
|
||||
void on_groupSelectionHalo_clicked(bool val) { view->view()->setSelectionHaloEnabled(val); }
|
||||
void on_spinHoverHaloFill_valueChanged(double val) { view->view()->setHoverHaloFillAlpha(val); }
|
||||
void on_spinSelectionHaloFill_valueChanged(double val) { view->view()->setSelectionHaloFillAlpha(val); }
|
||||
void on_colorHoverHalo_colorChanged(QColor color) { view->view()->setHoverHaloColor(color); }
|
||||
void on_colorSelectionHalo_colorChanged(QColor color) { view->view()->setSelectionHaloColor(color); }
|
||||
void on_checkFXAA_clicked(bool val) { view->view()->setFeature(QGLView::qglFXAA, val); }
|
||||
void on_checkMSAA_clicked(bool val) { view->view()->setFeature(QGLView::qglMSAA, val); }
|
||||
void on_colorBack_colorChanged(QColor color) { view->view()->setBackColor(color); }
|
||||
void on_colorAmbient_colorChanged(QColor color) { view->view()->setAmbientColor(color); }
|
||||
void on_checkCameraOrbit_clicked(bool val) { view->view()->setCameraOrbit(val); }
|
||||
void on_spinViewLineWidth_valueChanged(double val) { view->view()->setLineWidth(val); }
|
||||
|
||||
void on_groupShadows_clicked(bool val) {view->view()->setFeature(QGLView::qglShadowsEnabled, val);}
|
||||
void on_groupEyeAccomodation_clicked(bool val) {view->view()->setFeature(QGLView::qglEyeAccomodationEnabled, val);}
|
||||
void on_groupBloom_clicked(bool val) {view->view()->setFeature(QGLView::qglBloomEnabled, val);}
|
||||
void on_groupMotionBlur_clicked(bool val) {view->view()->setFeature(QGLView::qglMotionBlurEnabled, val);}
|
||||
void on_groupReflections_clicked(bool val) {view->view()->setFeature(QGLView::qglReflectionsEnabled, val);}
|
||||
void on_checkSoftShadows_clicked(bool val) {view->view()->setFeature(QGLView::qglShadowsSoftEnabled, val);}
|
||||
void on_groupSSAO_clicked(bool val) {view->view()->setFeature(QGLView::qglSSAOEnabled, val);}
|
||||
void on_groupDOF_clicked(bool val) {view->view()->setFeature(QGLView::qglDepthOfFieldEnabled, val);}
|
||||
void on_checkDOFAutoFocus_clicked(bool val) {view->view()->setFeature(QGLView::qglDepthOfFieldAutoFocusEnabled, val);}
|
||||
void on_spinDOFFocus_valueChanged(double val) {view->view()->setFeature(QGLView::qglDepthOfFieldFocus, val);}
|
||||
void on_spinDOFDiaphragm_valueChanged(double val) {view->view()->setFeature(QGLView::qglDepthOfFieldDiaphragm, val);}
|
||||
void on_spinDOFSpeed_valueChanged(double val) {view->view()->setFeature(QGLView::qglDepthOfFieldAutoFocusSpeed, val);}
|
||||
void on_spinAccom_valueChanged(double val) {view->view()->setFeature(QGLView::qglEyeAccomodationTime, val);}
|
||||
void on_spinAccomMS_valueChanged(double val) {view->view()->setFeature(QGLView::qglEyeAccomodationMaxSpeed, val);}
|
||||
void on_checkReflectionsBlur_clicked(bool val) {view->view()->setFeature(QGLView::qglReflectionsBlur, val);}
|
||||
void on_spinShadowmapSize_valueChanged(double val) {view->view()->setFeature(QGLView::qglShadowsMapSize, val);}
|
||||
void on_spinMotionBlurFactor_valueChanged(double val) {view->view()->setFeature(QGLView::qglMotionBlurFactor, val);}
|
||||
void on_spinMotionBlurSteps_valueChanged(int val) {view->view()->setFeature(QGLView::qglMotionBlurSteps, val);}
|
||||
void on_spinBloomFactor_valueChanged(double val) {view->view()->setFeature(QGLView::qglBloomFactor, val);}
|
||||
void on_spinBloomRadius_valueChanged(int val) {view->view()->setFeature(QGLView::qglBloomRadius, val);}
|
||||
void on_spinBloomThreshold_valueChanged(double val) {view->view()->setFeature(QGLView::qglBloomThreshold, val);}
|
||||
void on_spinSSAORadius_valueChanged(int val) {view->view()->setFeature(QGLView::qglSSAORadius, val);}
|
||||
void on_groupShadows_clicked(bool val) { view->view()->setFeature(QGLView::qglShadowsEnabled, val); }
|
||||
void on_groupEyeAccomodation_clicked(bool val) { view->view()->setFeature(QGLView::qglEyeAccomodationEnabled, val); }
|
||||
void on_groupBloom_clicked(bool val) { view->view()->setFeature(QGLView::qglBloomEnabled, val); }
|
||||
void on_groupMotionBlur_clicked(bool val) { view->view()->setFeature(QGLView::qglMotionBlurEnabled, val); }
|
||||
void on_groupReflections_clicked(bool val) { view->view()->setFeature(QGLView::qglReflectionsEnabled, val); }
|
||||
void on_checkSoftShadows_clicked(bool val) { view->view()->setFeature(QGLView::qglShadowsSoftEnabled, val); }
|
||||
void on_groupSSAO_clicked(bool val) { view->view()->setFeature(QGLView::qglSSAOEnabled, val); }
|
||||
void on_groupDOF_clicked(bool val) { view->view()->setFeature(QGLView::qglDepthOfFieldEnabled, val); }
|
||||
void on_checkDOFAutoFocus_clicked(bool val) { view->view()->setFeature(QGLView::qglDepthOfFieldAutoFocusEnabled, val); }
|
||||
void on_spinDOFFocus_valueChanged(double val) { view->view()->setFeature(QGLView::qglDepthOfFieldFocus, val); }
|
||||
void on_spinDOFDiaphragm_valueChanged(double val) { view->view()->setFeature(QGLView::qglDepthOfFieldDiaphragm, val); }
|
||||
void on_spinDOFSpeed_valueChanged(double val) { view->view()->setFeature(QGLView::qglDepthOfFieldAutoFocusSpeed, val); }
|
||||
void on_spinAccom_valueChanged(double val) { view->view()->setFeature(QGLView::qglEyeAccomodationTime, val); }
|
||||
void on_spinAccomMS_valueChanged(double val) { view->view()->setFeature(QGLView::qglEyeAccomodationMaxSpeed, val); }
|
||||
void on_checkReflectionsBlur_clicked(bool val) { view->view()->setFeature(QGLView::qglReflectionsBlur, val); }
|
||||
void on_spinShadowmapSize_valueChanged(double val) { view->view()->setFeature(QGLView::qglShadowsMapSize, val); }
|
||||
void on_spinMotionBlurFactor_valueChanged(double val) { view->view()->setFeature(QGLView::qglMotionBlurFactor, val); }
|
||||
void on_spinMotionBlurSteps_valueChanged(int val) { view->view()->setFeature(QGLView::qglMotionBlurSteps, val); }
|
||||
void on_spinBloomFactor_valueChanged(double val) { view->view()->setFeature(QGLView::qglBloomFactor, val); }
|
||||
void on_spinBloomRadius_valueChanged(int val) { view->view()->setFeature(QGLView::qglBloomRadius, val); }
|
||||
void on_spinBloomThreshold_valueChanged(double val) { view->view()->setFeature(QGLView::qglBloomThreshold, val); }
|
||||
void on_spinSSAORadius_valueChanged(int val) { view->view()->setFeature(QGLView::qglSSAORadius, val); }
|
||||
|
||||
void on_actionExit_triggered() {close();}
|
||||
void on_actionExit_triggered() { close(); }
|
||||
void on_actionReset_triggered();
|
||||
void on_actionImport_triggered();
|
||||
void on_actionSave_triggered();
|
||||
@@ -130,7 +136,7 @@ private slots:
|
||||
void selectionChanged(GLObjectBase * cur, GLObjectBase *);
|
||||
|
||||
void on_pushButton_clicked();
|
||||
void on_pushButton_2_clicked() {view->view()->reloadShaders();}
|
||||
void on_pushButton_2_clicked() { view->view()->reloadShaders(); }
|
||||
void on_pushButton_3_clicked();
|
||||
|
||||
public slots:
|
||||
@@ -139,7 +145,6 @@ signals:
|
||||
|
||||
private:
|
||||
QMatrix4x4 cam_mat;
|
||||
|
||||
};
|
||||
|
||||
#endif // QGLVIEWWINDOW_H
|
||||
|
||||
Reference in New Issue
Block a user