Gavin Andresen wrote:
>
> > const SbViewVolume & viewVol =
> > SoViewVolumeElement::get(action->getState());
> >
> > const SbMatrix & viewMat =
> >SoViewingMatrixElement::get(action->getState());
> >
> >
> >The separator reports that the bounding box cache (used for
> >render culling) is being invalidated. If I comment out these
> >lines of code, it's fine.
> >
> >Why?
>
> The ViewingMatrix and ViewVolume change whenever the camera moves, so if
> your GetBoundingBox method relies on them, then the bbox cache SHOULD be
> invalidated.
One of the keys to answering Chester's question is that calling the
"get()" methods on the elements results in a cache dependency being
created on those elements. So, yes, just looking at the values of the
elements (during cache construction) will change the behavior of the
cache.
----
Paul S. Strauss pss@xxxxxxxxx Pixar
|