UpdateMatrixTransform 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /* -*-c++-*-
  2. * Copyright (C) 2009 Cedric Pinson <cedric.pinson@plopbyte.net>
  3. *
  4. * This library is open source and may be redistributed and/or modified under
  5. * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
  6. * (at your option) any later version. The full license is in LICENSE file
  7. * included with this distribution, and on the openscenegraph.org website.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * OpenSceneGraph Public License for more details.
  13. */
  14. #ifndef OSGANIMATION_UPDATE_MATRIX_TRANSFORM
  15. #define OSGANIMATION_UPDATE_MATRIX_TRANSFORM 1
  16. #include <osg/Callback>
  17. #include <osgAnimation/Export>
  18. #include <osgAnimation/AnimationUpdateCallback>
  19. #include <osgAnimation/StackedTransform>
  20. namespace osgAnimation
  21. {
  22. class OSGANIMATION_EXPORT UpdateMatrixTransform : public AnimationUpdateCallback<osg::NodeCallback>
  23. {
  24. public:
  25. META_Object(osgAnimation, UpdateMatrixTransform);
  26. UpdateMatrixTransform(const std::string& name = "");
  27. UpdateMatrixTransform(const UpdateMatrixTransform& apc,const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
  28. // Callback method called by the NodeVisitor when visiting a node.
  29. virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
  30. virtual bool link(osgAnimation::Channel* channel);
  31. StackedTransform& getStackedTransforms() { return _transforms;}
  32. const StackedTransform& getStackedTransforms() const { return _transforms;}
  33. protected:
  34. StackedTransform _transforms;
  35. };
  36. }
  37. #endif