- Timestamp:
- 12/09/03 15:07:44 (9 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgvertexprogram/osgvertexprogram.cpp
r2233 r2517 197 197 198 198 199 struct MoveEarthySkyWithEyePointCallback : public osg::Transform::ComputeTransformCallback 200 { 199 class MoveEarthySkyWithEyePointTransform : public osg::Transform 200 { 201 public: 201 202 /** Get the transformation matrix which moves from local coords to world coords.*/ 202 virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix, const osg::Transform*,osg::NodeVisitor* nv) const203 virtual bool computeLocalToWorldMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const 203 204 { 204 205 osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); … … 212 213 213 214 /** Get the transformation matrix which moves from world coords to local coords.*/ 214 virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix, const osg::Transform*,osg::NodeVisitor* nv) const215 virtual bool computeWorldToLocalMatrix(osg::Matrix& matrix,osg::NodeVisitor* nv) const 215 216 { 216 217 osgUtil::CullVisitor* cv = dynamic_cast<osgUtil::CullVisitor*>(nv); … … 263 264 264 265 265 osg::Transform* transform = new osg::Transform;266 osg::Transform* transform = new MoveEarthySkyWithEyePointTransform; 266 267 transform->setCullingActive(false); 267 transform->setComputeTransformCallback(new MoveEarthySkyWithEyePointCallback);268 268 transform->addChild(geode); 269 269
