Yair Kurzion (yair++at++polygon.engr.sgi.com)
Wed, 9 Dec 1998 11:49:54 -0800 (PST)
> Yair: do we really need to explicitly recalculate our objects'
> bounding boxes at every frame, even though their geometry never changes?
> If that is the case, it seems much simpler to leave the code as is:
> rather than using a pfEngine, we use the ASD query results to calculate
> a matrix ourselves and stick it in a normal DCS node. And culling
> works fine.
Since your objects are aligned to a pfASD, their position changes when the ASD
surface morphs. The ASD morphing geometry usually moves the object in a fairly
limited region. This is why my previous e-mail suggests that you use a static
bounding volume and save a lot of CPU time.
If your application can tolerate re-calculating the bounding box of your objects
every frame, then you'll get tighter culling. However, if you have many
objects (say - trees), and you wish to avoid spending a lot of CPU time
calculating bounding boxes, you should use the static boxes as in my previous
mail. The culling will be a bit loose but you'll save many calculations.
A general note:
When you set the matrix explicitly on a pfDCS (via pfDCS::setMat), it causes a
re-evaluation of the bounding volume of its sub-tree.
When a pfEngine sets the matrix Flux of a pfFCS, the pfFCS does not even know
about it. Whenever pfFCS needs its matrix, it uses the most current pfFlux
buffer. It makes no attempt to check whether the most current matrix differs
from the previous matrix.
-yair
--
\_________ \_____ \__ \__ \_____ Yair Kurzion
\_________ \_____ \__ \__ \_____ yair++at++sgi.com
\__ \__ \____\__ \__ http://reality.sgi.com/yair
\__ \__ \__ Work: (650) 933-6502
\__ \__ \__ Home: (408) 226-9771
\__ \__ \__
This archive was generated by hypermail 2.0b2 on Wed Dec 09 1998 - 11:49:57 PST