snapshot before searching for remaining traversal/building bug
parent
76abaf1cb8
commit
82faa961a2
|
@ -830,6 +830,7 @@ public:
|
||||||
Float sa = aabb.getSurfaceArea();
|
Float sa = aabb.getSurfaceArea();
|
||||||
expTraversalSteps += sa;
|
expTraversalSteps += sa;
|
||||||
sahCost += sa * m_traversalCost;
|
sahCost += sa * m_traversalCost;
|
||||||
|
|
||||||
const KDNode *left;
|
const KDNode *left;
|
||||||
if (EXPECT_TAKEN(!node->isIndirection()))
|
if (EXPECT_TAKEN(!node->isIndirection()))
|
||||||
left = node->getLeft();
|
left = node->getLeft();
|
||||||
|
@ -2460,7 +2461,7 @@ protected:
|
||||||
static const int prevAxisTable[] = { 2, 0, 1 };
|
static const int prevAxisTable[] = { 2, 0, 1 };
|
||||||
static const int nextAxisTable[] = { 1, 2, 0 };
|
static const int nextAxisTable[] = { 1, 2, 0 };
|
||||||
|
|
||||||
KDStackEntry stack[MTS_KD_MAXDEPTH];
|
KDStackEntry stack[MTS_KD_MAXDEPTH*2];
|
||||||
const KDNode * __restrict farChild,
|
const KDNode * __restrict farChild,
|
||||||
* __restrict currNode = m_nodes;
|
* __restrict currNode = m_nodes;
|
||||||
|
|
||||||
|
@ -2469,12 +2470,12 @@ protected:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Set up the entry point */
|
/* Set up the entry point */
|
||||||
int enPt = 0;
|
uint32_t enPt = 0;
|
||||||
stack[enPt].t = mint;
|
stack[enPt].t = mint;
|
||||||
stack[enPt].p = ray(mint);
|
stack[enPt].p = ray(mint);
|
||||||
|
|
||||||
/* Set up the exit point */
|
/* Set up the exit point */
|
||||||
int exPt = 1;
|
uint32_t exPt = 1;
|
||||||
stack[exPt].t = maxt;
|
stack[exPt].t = maxt;
|
||||||
stack[exPt].p = ray(maxt);
|
stack[exPt].p = ray(maxt);
|
||||||
stack[exPt].node = NULL;
|
stack[exPt].node = NULL;
|
||||||
|
|
|
@ -161,7 +161,7 @@ public:
|
||||||
|
|
||||||
void test02_buildSimple() {
|
void test02_buildSimple() {
|
||||||
Properties bunnyProps("ply");
|
Properties bunnyProps("ply");
|
||||||
bunnyProps.setString("filename", "tools/tests/happy.ply");
|
bunnyProps.setString("filename", "tools/tests/bunny.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