From 262308b9b9ec15bda3b16cbf917436c8e9a69502 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Fri, 5 Oct 2012 00:24:15 -0400 Subject: [PATCH] Rectangle::getSurfaceArea() was wrong --- src/libbidir/SConscript | 4 ++-- src/shapes/rectangle.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libbidir/SConscript b/src/libbidir/SConscript index ac7e4ddb..5a78630c 100644 --- a/src/libbidir/SConscript +++ b/src/libbidir/SConscript @@ -3,8 +3,8 @@ Import('env', 'sys', 'os') bidirEnv = env.Clone() bidirEnv.Append(CPPDEFINES = [['MTS_BUILD_MODULE', 'MTS_MODULE_BIDIR']]) -#bidirEnv.RemoveFlags(['-O3']) -#bidirEnv.Append(CXXFLAGS = ['-O0']); +# bidirEnv.RemoveFlags(['-O3']) +# bidirEnv.Append(CXXFLAGS = ['-O0']); libbidir = bidirEnv.SharedLibrary('mitsuba-bidir', [ 'common.cpp', 'rsampler.cpp', 'vertex.cpp', 'edge.cpp', diff --git a/src/shapes/rectangle.cpp b/src/shapes/rectangle.cpp index 63e937f9..c4055818 100644 --- a/src/shapes/rectangle.cpp +++ b/src/shapes/rectangle.cpp @@ -119,7 +119,7 @@ public: } Float getSurfaceArea() const { - return 4 * m_dpdu.length() * m_dpdv.length(); + return m_dpdu.length() * m_dpdv.length(); } inline bool rayIntersect(const Ray &_ray, Float mint, Float maxt, Float &t, void *temp) const {