diff -r 9af5c039b678 -r 96d65f841791 include/shapes.h --- a/include/shapes.h Mon May 05 15:31:14 2008 +0200 +++ b/include/shapes.h Tue May 06 09:39:58 2008 +0200 @@ -49,6 +49,7 @@ { public: Material *material; + Shape() {}; virtual ~Shape() {}; @@ -176,11 +177,12 @@ */ class Triangle: public Shape { + Vector N; #ifdef TRI_BARI_PRE Float nu, nv, nd; - int k; // dominant axis Float bnu, bnv; Float cnu, cnv; + int k; // dominant axis #endif #ifdef TRI_BARI int k; // dominant axis @@ -188,7 +190,7 @@ #ifdef TRI_PLUCKER Float pla[6], plb[6], plc[6]; #endif - Vector N; + const Vector smooth_normal(const Vector &P) const { #ifdef TRI_BARI_PRE @@ -209,6 +211,7 @@ return N; // not implemented for other algorithms #endif }; + public: Vertex *A, *B, *C;