Added some templatedoctree to compile under 2003

This commit is contained in:
Paolo Cignoni 2006-10-18 15:11:26 +00:00
parent 8af861d31d
commit 9031924a14
1 changed files with 7 additions and 5 deletions

View File

@ -517,7 +517,8 @@ public:
object_count = 0; object_count = 0;
for (int i=0; i<leaves_count; i++) for (int i=0; i<leaves_count; i++)
{ {
voxel = OctreeTemplate< Voxel, SCALAR_TYPE >::Voxel(leaves[i]); //voxel = OctreeTemplate< Voxel, SCALAR_TYPE >::Voxel(leaves[i]);
voxel = TemplatedOctree::Voxel(leaves[i]);
begin = voxel->begin; begin = voxel->begin;
end = voxel->end; end = voxel->end;
for ( ; begin<end; begin++) for ( ; begin<end; begin++)
@ -697,11 +698,12 @@ public:
/* /*
* Draw the octree in a valid OpenGL context according to the rendering settings * Draw the octree in a valid OpenGL context according to the rendering settings
*/ */
void Octree::DrawOctree(vcg::Box3f &boundingBox, NodePointer n) void DrawOctree(vcg::Box3f &boundingBox, NodePointer n)
{ {
char level = Level(n); char _level;
_level= TemplatedOctree::Level(n);
NodePointer son; NodePointer son;
if (rendering_settings.minVisibleDepth>level) if (rendering_settings.minVisibleDepth>_level)
{ {
for (int s=0; s<8; s++) for (int s=0; s<8; s++)
if ((son=Son(n, s))!=0) if ((son=Son(n, s))!=0)
@ -710,7 +712,7 @@ public:
else else
{ {
vcg::glBoxWire(boundingBox); vcg::glBoxWire(boundingBox);
if (level<rendering_settings.maxVisibleDepth) if (_level<rendering_settings.maxVisibleDepth)
for (int s=0; s<8; s++) for (int s=0; s<8; s++)
if ((son=Son(n, s))!=0) if ((son=Son(n, s))!=0)
DrawOctree(TemplatedOctree::SubBox(boundingBox, s), son); DrawOctree(TemplatedOctree::SubBox(boundingBox, s), son);