faster builds
parent
5da46517da
commit
76a501b291
|
@ -74,6 +74,7 @@ if env.has_key('BASELIBDIR'):
|
|||
env.Append(LIBPATH=env['BASELIBDIR'])
|
||||
|
||||
env.Decider('MD5-timestamp')
|
||||
env.SetOption('implicit_cache', 1)
|
||||
|
||||
#env.SetOption('num_jobs', multiprocessing.cpu_count())
|
||||
|
||||
|
|
|
@ -80,6 +80,18 @@ public:
|
|||
Log(EInfo, "Performing initial clustering ..");
|
||||
MinMaxBins<MTS_KD_MINMAX_BINS> bins(m_aabb);
|
||||
bins.bin(aabbFunctor);
|
||||
split_candidate candidate = bins.maximizeSAH(m_traversalCost,
|
||||
m_intersectionCost, m_emptySpaceBonus);
|
||||
|
||||
cout << "originalCost = " << aabbFunctor.getPrimitiveCount() * m_intersectionCost << endl;
|
||||
|
||||
cout << "bestCost = "
|
||||
<< boost::get<0>(candidate)
|
||||
<< ", bestPos = "
|
||||
<< boost::get<1>(candidate)
|
||||
<< ", bestAxis = "
|
||||
<< boost::get<2>(candidate)
|
||||
<< endl;
|
||||
Log(EInfo, "Initial clustering took %i ms", timer->getMilliseconds());
|
||||
}
|
||||
protected:
|
||||
|
@ -318,7 +330,7 @@ protected:
|
|||
|
||||
Assert(bestCost != std::numeric_limits<Float>::infinity());
|
||||
|
||||
return boost::make_tuple(bestCost, bestAxis, bestPos);
|
||||
return boost::make_tuple(bestCost, bestPos, bestAxis);
|
||||
}
|
||||
private:
|
||||
size_type m_minBins[3*BinCount], m_maxBins[3*BinCount];
|
||||
|
|
|
@ -27,7 +27,7 @@ MTS_NAMESPACE_BEGIN
|
|||
/**
|
||||
* When a testcase is being compiled, define the following preprocessor macros for convenience
|
||||
*/
|
||||
#define assertEquals(expected, actual) assertEqualsImpl(expected, actual, Epsilon, __FILE__, __LINE__)
|
||||
#define assertEquals(expected, actual) assertEqualsImpl(expected, actual, 0, __FILE__, __LINE__)
|
||||
#define assertEqualsEpsilon(expected, actual, epsilon) assertEqualsImpl(expected, actual, epsilon, __FILE__, __LINE__)
|
||||
#define assertTrue(expr) assertTrueImpl(expr, #expr, __FILE__, __LINE__)
|
||||
#define assertFalse(expr) assertFalseImpl(expr, #expr, __FILE__, __LINE__)
|
||||
|
|
|
@ -70,6 +70,15 @@ public:
|
|||
));
|
||||
assertEquals(Point(0, 0, 0), clippedAABB.min);
|
||||
assertEquals(Point(1, 1, 0), clippedAABB.max);
|
||||
|
||||
/* Verify that a triangle just touching the clip AABB leads to a
|
||||
collapsed point AABB */
|
||||
clippedAABB = t.getClippedAABB(vertices, AABB(
|
||||
Point(0,1, 0),
|
||||
Point(1,2, 0)
|
||||
));
|
||||
assertEquals(Point(1, 1, 0), clippedAABB.min);
|
||||
assertEquals(Point(1, 1, 0), clippedAABB.max);
|
||||
}
|
||||
|
||||
class TriKDTree : GenericKDTree<Triangle> {
|
||||
|
@ -108,7 +117,7 @@ public:
|
|||
|
||||
void test02_buildSimple() {
|
||||
Properties bunnyProps("ply");
|
||||
bunnyProps.setString("filename", "tools/tests/lucy.ply");
|
||||
bunnyProps.setString("filename", "tools/tests/bunny.ply");
|
||||
|
||||
ref<TriMesh> mesh = static_cast<TriMesh *> (PluginManager::getInstance()->
|
||||
createObject(TriMesh::m_theClass, bunnyProps));
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
|
||||
Float value1 = vec1.eval(dir2);
|
||||
Float value2 = vec2.eval(dir1);
|
||||
assertEquals(value1, value2);
|
||||
assertEqualsEpsilon(value1, value2, Epsilon);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue