StackedTransformElement 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_STACKED_TRANSFORM_ELEMENT
  15. #define OSGANIMATION_STACKED_TRANSFORM_ELEMENT 1
  16. #include <osgAnimation/Export>
  17. #include <osg/Object>
  18. #include <osg/Matrix>
  19. namespace osgAnimation
  20. {
  21. class Target;
  22. class OSGANIMATION_EXPORT StackedTransformElement : public osg::Object
  23. {
  24. public:
  25. StackedTransformElement() {}
  26. StackedTransformElement(const StackedTransformElement& rhs, const osg::CopyOp& c) : osg::Object(rhs, c) {}
  27. virtual void applyToMatrix(osg::Matrix& matrix) const = 0;
  28. virtual osg::Matrix getAsMatrix() const = 0;
  29. virtual bool isIdentity() const = 0;
  30. virtual void update(float t) = 0;
  31. virtual Target* getOrCreateTarget() {return 0;}
  32. virtual Target* getTarget() {return 0;}
  33. virtual const Target* getTarget() const {return 0;}
  34. };
  35. }
  36. #endif