diff -r 64e456ab823d -r a23b5089b9c3 include/scene.h --- a/include/scene.h Fri Apr 04 13:54:47 2008 +0200 +++ b/include/scene.h Tue Apr 08 01:05:12 2008 +0200 @@ -295,6 +295,7 @@ public: Vertex *A, *B, *C; + Triangle() {}; Triangle(Vertex *aA, Vertex *aB, Vertex *aC, Material *amaterial); bool intersect(const Ray &ray, Float &dist) const; bool intersect_all(const Ray &ray, Float dist, vector &allts) const {return false;}; @@ -307,4 +308,17 @@ BBox get_bbox() const; }; +template class Array +{ + T *array; +public: + Array(int n) { array = new T[n]; }; + ~Array() { delete[] array; }; + const T &operator[](int i) const { return array[i]; }; +}; + +typedef Array VertexArray; +typedef Array NormalVertexArray; +typedef Array TriangleArray; + #endif