Hi Chase, Interesting problem.. AutoTransform is view dependent so it does require the modelview matrix to be able to orientate and scale itself. An invalid bounding volume is normally passed by the cull traversal, but it also doesn't contribute to its parents bounding volume when it computes its bounding volume as it can't as its indeterminate.
In you scene graph set up the bounding volume of the parent is ending up set, but small enough that small feature culling will be taking effect, so that the AutoTransform doesn't get traversed and there never set... A catch 22. I can't think of any easy solutions, and possible requires mods to the core OSG to change the policy of how the bounding volume of AutoTransforms are managed. A workaround right now would be to set an initial BoundingSphere (Node::setInitialBound()) on the AutoTransform so that it does at least have a basic volume to begin with. Another might be disable culling for the AutoTransform via Node::setCullingActive(false). Robert. On 12/19/06, Bradford, Chase <[EMAIL PROTECTED]> wrote:
I have a group that contains 2 children. The first is a geode that holds a LineStrip geometry. The line strip starts off empty, so the geode's bounding sphere is radius=0 at (0,0,0). The second child is a PositionAttitudeTransform that contains an AutoTransform that holds a geode with a Sphere drawable (radius 2.0). When the group is first created and added to the group, the bounding sphere is recomputed and set to empty, as expected. However, when the PositionAttitudeTransform is added, the bounding sphere should grow. However, this doesn't seem to happen as long as the first child's bounding radius is 0. It looks as though the AutoTransform returns an invalid bounding box until it is visited by the cull visitor. This causes the PAT to return an invalid BB. Then, inside the group's computeBound, the invalid BB is used to expand the BB that contains all children. However, when an empty box is expanded by an invalid, the box remains empty. In the end, the group is given an empty bounding box, not an invalid one. I'm guessing that during the cull phase, the visitor stops at the group since it has an empty BB, so the AutoTransform's bounds never get computed. If I look away from where the auto transform should be, then look back, its sphere appears. Chase _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
