diff --git a/main/Scene.cc b/main/Scene.cc index 55327af..4373370 100644 --- a/main/Scene.cc +++ b/main/Scene.cc @@ -10,7 +10,6 @@ #include #include "BMP.h" #include "shapes/Shape.h" -#include "shapes/Sphere.h" #include "PointLight.h" using namespace std; @@ -86,6 +85,9 @@ Scene::~Scene() void Scene::load(const char * filename) { /* TODO: parse file somehow */ + Shape * plane = new Plane(0, 0, 1, -2); + m_shapes.push_back(plane); + Shape * shape = new Sphere(1.0); m_transform.translate(1.0, 5.0, 0.5); shape->setTransform(m_transform); diff --git a/shapes/Shape.h b/shapes/Shape.h index 1fb9a72..ccc2b58 100644 --- a/shapes/Shape.h +++ b/shapes/Shape.h @@ -32,5 +32,8 @@ class Shape double m_transparency; }; +#include "Sphere.h" +#include "Plane.h" + #endif diff --git a/test/tests.cc b/test/tests.cc index 452f7d1..4cffcce 100644 --- a/test/tests.cc +++ b/test/tests.cc @@ -12,7 +12,7 @@ int main() Shape::IntersectList res = s.intersect(ray); - for (int i = 0; i < res.size(); i++) + for (unsigned int i = 0; i < res.size(); i++) { cout << "t: " << res[i] << endl; } diff --git a/util/Transform.cc b/util/Transform.cc index 1e9e6ed..20cdd49 100644 --- a/util/Transform.cc +++ b/util/Transform.cc @@ -4,7 +4,6 @@ Transform::Transform() { - m_matrix = Matrix::identity(); } Transform Transform::getInverse()