aboutsummaryrefslogtreecommitdiff
path: root/app/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.cpp')
-rw-r--r--app/main.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/app/main.cpp b/app/main.cpp
index 48e26fe..e53b8ad 100644
--- a/app/main.cpp
+++ b/app/main.cpp
@@ -14,6 +14,14 @@ int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Scene scn;
+ Config conf;
+ conf.m_width = 500;
+ conf.m_height = 500;
+ conf.m_maxhops = 5;
+ conf.m_samples = 100;
+ conf.m_framerate = 3;
+ conf.m_workers = 4;
+
Material blue(Color(0.3, 0.3, 1), 1);
Material red(Color(1, 0.3, 0.3), 1);
@@ -25,15 +33,15 @@ int main(int argc, char *argv[])
scn.addShape(new Sphere(white, Vec3d(-2, 5, -2), 1.3));
scn.addShape(new Sphere(blue, Vec3d(0, 7, 0), 0.5));
- scn.addShape(new Plane(white, Vec3d(0, 0, 0), Vec3d(0, 1, 0)));
- scn.addShape(new Plane(em, Vec3d(0, 10, 0), Vec3d(0, 1, 0)));
+ scn.addShape(new Plane(em, Vec3d(0, 0, 0), Vec3d(0, 1, 0)));
+ scn.addShape(new Plane(white, Vec3d(0, 10, 0), Vec3d(0, 1, 0)));
scn.addShape(new Plane(white, Vec3d(0, 0, -5), Vec3d(0, 0, 1)));
scn.addShape(new Plane(red, Vec3d(-5, 0, 0), Vec3d(1, 0, 0)));
scn.addShape(new Plane(blue, Vec3d(5, 0, 0), Vec3d(1, 0, 0)));
- Renderer render(scn, Vec3d(0, 5, 4), Vec3d(0, 5, 0), 500, 500, 5);
+ RendererConf render(scn, Vec3d(0, 5, 4), Vec3d(0, 5, 0), conf);
- MainWindow main(render);
+ MainWindow main(render, conf);
main.show();
return a.exec();