Removed osg::Transform::ComputeTransformCallback from osg::Transform.

Updated various dependant files to reimplemt callbacks as Transform subclasses.
This commit is contained in:
Robert Osfield
2003-12-09 14:07:44 +00:00
parent d76cef6f8e
commit 9780a7cbd6
10 changed files with 23 additions and 112 deletions

View File

@@ -196,10 +196,11 @@ public:
};
struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback
class MoveEarthySkyWithEyePointTransform : public osg::Transform
{
public:
/** Get the transformation matrix which moves from local coords to world coords.*/
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const
{
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
if (cv)
@@ -211,7 +212,7 @@ struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransfo
}
/** Get the transformation matrix which moves from world coords to local coords.*/
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,const osg::Transform*, osg::NodeVisitor* nv) const
virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const
{
osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv);
if (cv)
@@ -262,9 +263,8 @@ osg::Node* createSkyBox()
geode->addDrawable(drawable);
osg::Transform* transform = new osg::Transform;
osg::Transform* transform = new MoveEarthySkyWithEyePointTransform;
transform->setCullingActive(false);
transform->setComputeTransformCallback(new MoveEarthySkyWithEyePointCallback);
transform->addChild(geode);
osg::ClearNode* clearNode = new osg::ClearNode;