src/scene.cc
branchpyrit
changeset 31 b4e09433934a
parent 28 ffe83ca074f3
child 34 28f6e8b9d5d1
equal deleted inserted replaced
30:33f95441790e 31:b4e09433934a
   205 
   205 
   206 Triangle::Triangle(Vertex *aA, Vertex *aB, Vertex *aC, Material *amaterial)
   206 Triangle::Triangle(Vertex *aA, Vertex *aB, Vertex *aC, Material *amaterial)
   207 	: smooth(false), A(aA), B(aB), C(aC)
   207 	: smooth(false), A(aA), B(aB), C(aC)
   208 {
   208 {
   209 	material = amaterial;
   209 	material = amaterial;
   210 	material->reflection = 0;
       
   211 
   210 
   212 	const Vector3 c = B->P - A->P;
   211 	const Vector3 c = B->P - A->P;
   213 	const Vector3 b = C->P - A->P;
   212 	const Vector3 b = C->P - A->P;
   214 
   213 
   215 	N = cross(c, b);
   214 	N = cross(c, b);