Fix bounds calculation for addLight to a transform node

coverity_scan
scrawl 9 years ago
parent 93cc08a09c
commit e1c7165bfb

@ -55,7 +55,9 @@ namespace SceneUtil
{
osg::ComputeBoundsVisitor computeBound;
computeBound.setTraversalMask(~partsysMask);
node->accept(computeBound);
// We want the bounds of all children of the node, ignoring the node's local transformation
// So do a traverse(), not accept()
computeBound.traverse(*node);
// PositionAttitudeTransform seems to be slightly faster than MatrixTransform
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> trans(new SceneUtil::PositionAttitudeTransform);

Loading…
Cancel
Save