I have many object into scene that change in number. I want to calculate the bound of this group (l,h,p).
How can I do this?
S.
I have many object into scene that change in number. I want to calculate the bound of this group (l,h,p).
How can I do this?
S.
When creating an object, you could keep a reference to its position, and keep track of what the object with the highest and lowest valued positions are for the three axes (x,y,z), and then just subtract the lowest from the highest.
Another way would be to iterate through all the objects at a given time, and record the min/max values of their bounding boxes (or just positions), and again, subtract the min from the max.
Either way, you’re probably not going to be able to do this without checking the objects positions at least once.