From Cedric Pinson, Simplify update callback api in osgAnimation, the decision to link is on the manager or user

This commit is contained in:
Cedric Pinson
2009-10-23 20:35:31 +00:00
parent 2ca76844cc
commit c837d34692
2 changed files with 2 additions and 50 deletions

View File

@@ -89,12 +89,6 @@ void UpdateTransform::update(osg::PositionAttitudeTransform& pat)
pat.dirtyBound();
}
bool UpdateTransform::needLink() const
{
// the idea is to return true if nothing is linked
return !((_position->getCount() + _euler->getCount() + _scale->getCount()) > 3);
}
bool UpdateTransform::link(osgAnimation::Channel* channel)
{
if (channel->getName().find("euler") != std::string::npos)
@@ -152,12 +146,6 @@ void UpdateMaterial::update(osg::Material& material)
material.setDiffuse(osg::Material::FRONT_AND_BACK, diffuse);
}
bool UpdateMaterial::needLink() const
{
// the idea is to return true if nothing is linked
return (_diffuse->getCount() < 2);
}
bool UpdateMaterial::link(osgAnimation::Channel* channel)
{
if (channel->getName().find("diffuse") != std::string::npos)