openscenegraph
TransformCallback
Go to the documentation of this file.
1/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2 *
3 * This library is open source and may be redistributed and/or modified under
4 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5 * (at your option) any later version. The full license is in LICENSE file
6 * included with this distribution, and on the openscenegraph.org website.
7 *
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * OpenSceneGraph Public License for more details.
12*/
13//C++ header
14
15#ifndef OSGUTIL_TRANSFORMCALLBACK
16#define OSGUTIL_TRANSFORMCALLBACK 1
17
18#include <osg/Callback>
19#include <osgUtil/Export>
20
21namespace osgUtil
22{
23
24/** TransformCallback is now deprecated, use osg::AnimationPathCallback instead.*/
25class OSGUTIL_EXPORT TransformCallback : public osg::NodeCallback
26{
27
28 public:
29
30 TransformCallback(const osg::Vec3& pivot,const osg::Vec3& axis,float angularVelocity);
31
32 void setPause(bool pause) { _pause = pause; }
33
34 /** implements the callback*/
35 virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
36
37 protected:
38
39 float _angular_velocity;
40 osg::Vec3 _pivot;
41 osg::Vec3 _axis;
42
43 unsigned int _previousTraversalNumber;
44 double _previousTime;
45 bool _pause;
46
47};
48
49}
50
51#endif