more statistics
parent
effb3ebfb0
commit
74fb4d009c
|
@ -69,9 +69,11 @@ public:
|
||||||
m_maxDepth = std::min((int) (8 + 1.3f * log2i(functor.getPrimitiveCount())),
|
m_maxDepth = std::min((int) (8 + 1.3f * log2i(functor.getPrimitiveCount())),
|
||||||
MTS_KD_MAX_DEPTH);
|
MTS_KD_MAX_DEPTH);
|
||||||
|
|
||||||
|
ref<Timer> timer = new Timer();
|
||||||
m_aabb.reset();
|
m_aabb.reset();
|
||||||
for (size_type i=0; i<functor.getPrimitiveCount(); ++i)
|
for (size_type i=0; i<functor.getPrimitiveCount(); ++i)
|
||||||
m_aabb.expandBy(functor.getAABB(i));
|
m_aabb.expandBy(functor.getAABB(i));
|
||||||
|
Log(EInfo, "Computed scene bounds in %i ms", timer->getMilliseconds());
|
||||||
|
|
||||||
Log(EDebug, "kd-tree configuration:");
|
Log(EDebug, "kd-tree configuration:");
|
||||||
Log(EDebug, " Traversal cost : %.2f", m_traversalCost);
|
Log(EDebug, " Traversal cost : %.2f", m_traversalCost);
|
||||||
|
@ -84,7 +86,8 @@ public:
|
||||||
Log(EInfo, "Constructing a SAH kd-tree (%i primitives) ..",
|
Log(EInfo, "Constructing a SAH kd-tree (%i primitives) ..",
|
||||||
functor.getPrimitiveCount());
|
functor.getPrimitiveCount());
|
||||||
|
|
||||||
ref<Timer> timer = new Timer();
|
timer->reset();
|
||||||
|
|
||||||
Log(EInfo, "Performing initial clustering ..");
|
Log(EInfo, "Performing initial clustering ..");
|
||||||
MinMaxBins<MTS_KD_MINMAX_BINS> bins(m_aabb);
|
MinMaxBins<MTS_KD_MINMAX_BINS> bins(m_aabb);
|
||||||
bins.bin(functor);
|
bins.bin(functor);
|
||||||
|
@ -244,6 +247,12 @@ protected:
|
||||||
|
|
||||||
BOOST_STATIC_ASSERT(sizeof(KDNode) == 8);
|
BOOST_STATIC_ASSERT(sizeof(KDNode) == 8);
|
||||||
|
|
||||||
|
class ChunkAllocator {
|
||||||
|
public:
|
||||||
|
ChunkAllocator() {
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Min-max binning as described in
|
* \brief Min-max binning as described in
|
||||||
* "Highly Parallel Fast KD-tree Construction for Interactive
|
* "Highly Parallel Fast KD-tree Construction for Interactive
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
|
|
||||||
void test02_buildSimple() {
|
void test02_buildSimple() {
|
||||||
Properties bunnyProps("ply");
|
Properties bunnyProps("ply");
|
||||||
bunnyProps.setString("filename", "tools/tests/bunny.ply");
|
bunnyProps.setString("filename", "tools/tests/menger.ply");
|
||||||
|
|
||||||
ref<TriMesh> mesh = static_cast<TriMesh *> (PluginManager::getInstance()->
|
ref<TriMesh> mesh = static_cast<TriMesh *> (PluginManager::getInstance()->
|
||||||
createObject(TriMesh::m_theClass, bunnyProps));
|
createObject(TriMesh::m_theClass, bunnyProps));
|
||||||
|
|
Loading…
Reference in New Issue