Changeset 13041 for OpenSceneGraph/trunk/src/osg/Group.cpp
- Timestamp:
- 03/21/12 18:36:20 (14 months ago)
- Files:
-
- 1 modified
-
OpenSceneGraph/trunk/src/osg/Group.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osg/Group.cpp
r11472 r13041 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield 2 2 * 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 3 * This library is open source and may be redistributed and/or modified under 4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or 5 5 * (at your option) any later version. The full license is in LICENSE file 6 6 * included with this distribution, and on the openscenegraph.org website. 7 * 7 * 8 8 * This library is distributed in the hope that it will be useful, 9 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 11 * OpenSceneGraph Public License for more details. 12 12 */ … … 73 73 { 74 74 if (!child) return false; 75 76 #if ENSURE_CHILD_IS_UNIQUE 75 76 #if ENSURE_CHILD_IS_UNIQUE 77 77 if (containsNode(child)) 78 78 { … … 81 81 } 82 82 #endif 83 83 84 84 if (child) 85 85 { … … 96 96 // register as parent of child. 97 97 child->addParent(this); 98 98 99 99 // tell any subclasses that a child has been inserted so that they can update themselves. 100 100 childInserted(index); … … 186 186 setNumChildrenRequiringUpdateTraversal(getNumChildrenRequiringUpdateTraversal()-updateCallbackRemoved); 187 187 } 188 188 189 189 if (eventCallbackRemoved) 190 190 { … … 196 196 setNumChildrenWithCullingDisabled(getNumChildrenWithCullingDisabled()-numChildrenWithCullingDisabledRemoved); 197 197 } 198 198 199 199 if (numChildrenWithOccludersRemoved) 200 200 { 201 201 setNumChildrenWithOccluderNodes(getNumChildrenWithOccluderNodes()-numChildrenWithOccludersRemoved); 202 202 } 203 203 204 204 dirtyBound(); 205 205 206 206 return true; 207 207 } … … 227 227 if (i<_children.size() && newNode) 228 228 { 229 229 230 230 ref_ptr<Node> origNode = _children[i]; 231 231 232 232 // first remove for origNode's parent list. 233 233 origNode->removeParent(this); … … 298 298 ++delta_numChildrenWithCullingDisabled; 299 299 } 300 300 301 301 if (delta_numChildrenWithCullingDisabled!=0) 302 302 { … … 319 319 ++delta_numChildrenWithOccluderNodes; 320 320 } 321 321 322 322 if (delta_numChildrenWithOccluderNodes!=0) 323 323 { … … 336 336 { 337 337 BoundingSphere bsphere; 338 if (_children.empty()) 338 if (_children.empty()) 339 339 { 340 340 return bsphere; … … 359 359 } 360 360 361 if (!bb.valid()) 361 if (!bb.valid()) 362 362 { 363 363 return bsphere;
