Removed osg::Transform::ComputeTransformCallback from osg::Transform.
Updated various dependant files to reimplemt callbacks as Transform subclasses.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user