From 6f3e2b681cd86c9750e767c038d9135e85d913ba Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 11 Nov 2002 08:52:24 +0000 Subject: [PATCH] Fixed bug in osg::Node::isCullingActive(). Rnabled the automatic selection of the animation path if one is specified on the commandline in sgv. --- include/osg/Node | 2 +- src/Demos/sgv/sgv.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/osg/Node b/include/osg/Node index 870873b15..4a3e924f1 100644 --- a/include/osg/Node +++ b/include/osg/Node @@ -153,7 +153,7 @@ class SG_EXPORT Node : public Object /** Return true if this node can be culled by view frustum, occlusion or small feature culling during the cull traversal. * note, return true only if no children have culling disabled, and the local _cullingActive flag is true.*/ - inline bool isCullingActive() const { return _numChildrenWithCullingDisabled==0 && _cullingActive && _bsphere.valid(); } + inline bool isCullingActive() const { return _numChildrenWithCullingDisabled==0 && _cullingActive && getBound().valid(); } /** Get the number of Children of this node which are or have OccluderNode's.*/ inline unsigned int getNumChildrenWithOccluderNodes() const { return _numChildrenWithOccluderNodes; } diff --git a/src/Demos/sgv/sgv.cpp b/src/Demos/sgv/sgv.cpp index 9ab4f30e7..d86091de1 100644 --- a/src/Demos/sgv/sgv.cpp +++ b/src/Demos/sgv/sgv.cpp @@ -150,12 +150,12 @@ int main( int argc, char **argv ) osgGA::AnimationPathManipulator *apm = new osgGA::AnimationPathManipulator(pathfile); if( apm->valid() ) { - viewer.registerCameraManipulator(apm); + //viewer.registerCameraManipulator(apm); // selecting the animation path manipulator up front seems to disable view frustum // in a heavy duty way that I'm do understand yet, so I'm commenting out for the // time being. Simply pressing '4' will get you the animation path working correctly. - //unsigned int no = viewer.registerCameraManipulator(apm); - //viewer.selectCameraManipulator(no); + unsigned int no = viewer.registerCameraManipulator(apm); + viewer.selectCameraManipulator(no); } else delete apm;