"...svn:/svn.code.sf.net/p/irrlicht/code/trunk@4298" did not exist on "ecc6ea3884140f3b15b7938ba40840bbb5e4e754"
Commit 401a1e10 authored by bitplane's avatar bitplane

couldn't work out why oct-trees were culled against the bounding box of the...

couldn't work out why oct-trees were culled against the bounding box of the frustum rather than the frustum itself. works better than the bounding box method in my test meshes (box method culls too much) so I changed it back to use frustum method.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@705 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ef6f9fd0
......@@ -113,16 +113,19 @@ void COctTreeSceneNode::render()
//transform the frustum to the current absolute transformation
core::matrix4 invTrans(AbsoluteTransformation);
invTrans.makeInverse();
frust.transform(invTrans);
/*
//frust.transform(invTrans);
//const core::aabbox3d<float> &box = frust.getBoundingBox();
*/
const core::aabbox3d<float> &box = frust.getBoundingBox();
frust.transform(invTrans);
switch(vertexType)
{
case video::EVT_STANDARD:
{
StdOctTree->calculatePolys(box);
//StdOctTree->calculatePolys(frust);
//StdOctTree->calculatePolys(box);
StdOctTree->calculatePolys(frust);
OctTree<video::S3DVertex>::SIndexData* d = StdOctTree->getIndexData();
......@@ -168,8 +171,8 @@ void COctTreeSceneNode::render()
}
case video::EVT_2TCOORDS:
{
LightMapOctTree->calculatePolys(box);
//LightMapOctTree->calculatePolys(frust);
//LightMapOctTree->calculatePolys(box);
LightMapOctTree->calculatePolys(frust);
OctTree<video::S3DVertex2TCoords>::SIndexData* d = LightMapOctTree->getIndexData();
......
......@@ -95,7 +95,7 @@ public:
for (u32 i=0; i<IndexDataCount; ++i)
IndexData[i].CurrentSize = 0;
Root->getPolys(frustum, IndexData);
Root->getPolys(frustum, IndexData, 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment