IDummyTransformationSceneNode.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (C) 2002-2012 Nikolaus Gebhardt
  2. // This file is part of the "Irrlicht Engine".
  3. // For conditions of distribution and use, see copyright notice in irrlicht.h
  4. #ifndef IRR_I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED
  5. #define IRR_I_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED
  6. #include "ISceneNode.h"
  7. namespace irr
  8. {
  9. namespace scene
  10. {
  11. //! Dummy scene node for adding additional transformations to the scene graph.
  12. /** This scene node does not render itself, and does not respond to set/getPosition,
  13. set/getRotation and set/getScale. Its just a simple scene node that takes a
  14. matrix as relative transformation, making it possible to insert any transformation
  15. anywhere into the scene graph.
  16. This scene node is for example used by the IAnimatedMeshSceneNode for emulating
  17. joint scene nodes when playing skeletal animations.
  18. */
  19. class IDummyTransformationSceneNode : public ISceneNode
  20. {
  21. public:
  22. //! Constructor
  23. IDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id)
  24. : ISceneNode(parent, mgr, id) {}
  25. //! Returns a reference to the current relative transformation matrix.
  26. /** This is the matrix, this scene node uses instead of scale, translation
  27. and rotation. */
  28. virtual core::matrix4& getRelativeTransformationMatrix() = 0;
  29. };
  30. } // end namespace scene
  31. } // end namespace irr
  32. #endif