mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 22:23:51 +00:00
Fix bounds calculation for addLight to a transform node
This commit is contained in:
parent
93cc08a09c
commit
e1c7165bfb
1 changed files with 3 additions and 1 deletions
|
@ -55,7 +55,9 @@ namespace SceneUtil
|
||||||
{
|
{
|
||||||
osg::ComputeBoundsVisitor computeBound;
|
osg::ComputeBoundsVisitor computeBound;
|
||||||
computeBound.setTraversalMask(~partsysMask);
|
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
|
// PositionAttitudeTransform seems to be slightly faster than MatrixTransform
|
||||||
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> trans(new SceneUtil::PositionAttitudeTransform);
|
osg::ref_ptr<SceneUtil::PositionAttitudeTransform> trans(new SceneUtil::PositionAttitudeTransform);
|
||||||
|
|
Loading…
Reference in a new issue