Subversion Repositories gelsvn

Rev

Rev 334 | Rev 375 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 334 Rev 371
Line 38... Line 38...
38
		// For each face
38
		// For each face
39
		int NF = geometry.no_faces();
39
		int NF = geometry.no_faces();
40
		for(i=0;i<NF; ++i)
40
		for(i=0;i<NF; ++i)
41
      {
41
      {
42
				// Compute the normal
42
				// Compute the normal
43
				const Vec3i& f  = geometry.face(i);
43
				const Vec3i f  = geometry.face(i);
44
				const Vec3f p0 = geometry.vertex(f[0]);
44
				const Vec3f p0 = geometry.vertex(f[0]);
45
				const Vec3f a  = geometry.vertex(f[1]) - p0;
45
				const Vec3f a  = geometry.vertex(f[1]) - p0;
46
				const Vec3f b  = geometry.vertex(f[2]) - p0;
46
				const Vec3f b  = geometry.vertex(f[2]) - p0;
47
				Vec3f face_normal = cross(a,b);
47
				Vec3f face_normal = cross(a,b);
48
				float l = sqr_length(face_normal);
48
				float l = sqr_length(face_normal);