diff options
author | Julian T <julian@jtle.dk> | 2021-01-24 18:13:44 +0100 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-01-24 18:22:11 +0100 |
commit | 41ea2d8f94043d49fc26aaaa8030a73dcfdc2da9 (patch) | |
tree | fcc07052425c65b38c1724f4fc30299a1cb48716 /app/main.cpp | |
parent | a38e6014ea5441e9d29fcb3b5607cd94e4061cff (diff) |
Create rust project
Diffstat (limited to 'app/main.cpp')
-rw-r--r-- | app/main.cpp | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/app/main.cpp b/app/main.cpp deleted file mode 100644 index e53b8ad..0000000 --- a/app/main.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include <iostream> -#include <qapplication.h> -#include <qpushbutton.h> - -#include "mainwindow.hpp" -#include "vector.hpp" -#include <scene.hpp> -#include <render.hpp> -#include <object.hpp> - -using namespace std; - -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); - Material white(Color(1, 1, 1), 1); - Material em(Color(1, 1, 1), 0, 2); - - scn.addShape(new Sphere(red, Vec3d(2, 6, -1), 1)); - scn.addShape(new Sphere(white, Vec3d(0, 4, -1), 1.3)); - 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(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))); - - RendererConf render(scn, Vec3d(0, 5, 4), Vec3d(0, 5, 0), conf); - - MainWindow main(render, conf); - main.show(); - - return a.exec(); -} |