Skeleton 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /* -*-c++-*-
  2. * Copyright (C) 2008 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_SKELETON
  15. #define OSGANIMATION_SKELETON 1
  16. #include <osgAnimation/Export>
  17. #include <osg/MatrixTransform>
  18. #include <osg/Callback>
  19. namespace osgAnimation
  20. {
  21. class OSGANIMATION_EXPORT Skeleton : public osg::MatrixTransform
  22. {
  23. public:
  24. META_Node(osgAnimation, Skeleton);
  25. class OSGANIMATION_EXPORT UpdateSkeleton : public osg::NodeCallback
  26. {
  27. public:
  28. META_Object(osgAnimation, UpdateSkeleton);
  29. UpdateSkeleton();
  30. UpdateSkeleton(const UpdateSkeleton&, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
  31. virtual void operator()(osg::Node* node, osg::NodeVisitor* nv);
  32. bool needToValidate() const;
  33. protected:
  34. bool _needValidate;
  35. };
  36. Skeleton();
  37. Skeleton(const Skeleton&, const osg::CopyOp&);
  38. void setDefaultUpdateCallback();
  39. };
  40. }
  41. #endif