POV-Ray : Newsgroups : povray.advanced-users : output an octree file : Re: output an octree file Server Time
1 Jul 2024 06:10:24 EDT (-0400)
  Re: output an octree file  
From: Alain
Date: 17 Aug 2010 16:02:08
Message: <4c6aeac0$1@news.povray.org>


> Is there some kind of function that can return a list of all the objects in the
> scene? I would need this kind of function to find the bounding box of each
> object because i want it to work on any scene.
>
>

There is no such function, at least, to my knowlege. Anyway, it could'nt 
return any object that are not yet defined.

What you can do is to create an array and declare your objects as 
elements of said array. Just replace the normal declaration by:
#declare Array[Index] = <object's definition>
You then use a loop to work your way through that array and instanciate 
the various objects.

You can also declare your objects normaly, then use
#declare Array[index] = Declared_Object
But this will require double the memory.

Both of those won't be able to take count of an object like 
sphere{<1,2,3>,2}



Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.