From Cedric Pinson,

Add check in RigTransformSoftware if bones are null
Indent TimelineAnimationManager
Add check for NaN in UpdateCallback.cpp
Fix TimelineAnimationManager clear target (a refactore of Timeline is require for futur)
Fix Computation of bounding box for RigGeometry
This commit is contained in:
Cedric Pinson
2009-12-09 18:45:46 +00:00
parent f099dab160
commit 53d5b56202
8 changed files with 81 additions and 34 deletions

View File

@@ -19,6 +19,7 @@
#include <osgAnimation/UpdateCallback>
#include <osg/MatrixTransform>
#include <osg/PositionAttitudeTransform>
#include <osg/Math>
using namespace osgAnimation;
@@ -69,10 +70,11 @@ void UpdateTransform::update(osg::MatrixTransform& mat)
osg::Matrix::rotate(x,1.0,0.0,0.0) *
osg::Matrix::rotate(y,0.0,1.0,0.0) *
osg::Matrix::rotate(z,0.0,0.0,1.0);
mat.setMatrix(osg::Matrix::scale(_scale->getValue()) *
m *
osg::Matrix::translate(_position->getValue()));
mat.dirtyBound();
m = osg::Matrix::scale(_scale->getValue()) * m * osg::Matrix::translate(_position->getValue());
mat.setMatrix(m);
if (!m.valid())
osg::notify(osg::WARN) << this << " UpdateTransform::update detected NaN" << std::endl;
}
void UpdateTransform::update(osg::PositionAttitudeTransform& pat)