CDummyTransformationSceneNode.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
  5. #define __C_DUMMY_TRANSFORMATION_SCENE_NODE_H_INCLUDED__
  6. #include "IDummyTransformationSceneNode.h"
  7. namespace irr
  8. {
  9. namespace scene
  10. {
  11. class CDummyTransformationSceneNode : public IDummyTransformationSceneNode
  12. {
  13. public:
  14. //! constructor
  15. CDummyTransformationSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id);
  16. //! returns the axis aligned bounding box of this node
  17. virtual const core::aabbox3d<f32>& getBoundingBox() const;
  18. //! Returns a reference to the current relative transformation matrix.
  19. //! This is the matrix, this scene node uses instead of scale, translation
  20. //! and rotation.
  21. virtual core::matrix4& getRelativeTransformationMatrix();
  22. //! Returns the relative transformation of the scene node.
  23. virtual core::matrix4 getRelativeTransformation() const;
  24. //! does nothing.
  25. virtual void render() {}
  26. //! Returns type of the scene node
  27. virtual ESCENE_NODE_TYPE getType() const { return ESNT_DUMMY_TRANSFORMATION; }
  28. //! Creates a clone of this scene node and its children.
  29. virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
  30. private:
  31. // TODO: We can add least add some warnings to find troubles faster until we have
  32. // fixed bug id 2318691.
  33. virtual const core::vector3df& getScale() const;
  34. virtual void setScale(const core::vector3df& scale);
  35. virtual const core::vector3df& getRotation() const;
  36. virtual void setRotation(const core::vector3df& rotation);
  37. virtual const core::vector3df& getPosition() const;
  38. virtual void setPosition(const core::vector3df& newpos);
  39. core::matrix4 RelativeTransformationMatrix;
  40. core::aabbox3d<f32> Box;
  41. };
  42. } // end namespace scene
  43. } // end namespace irr
  44. #endif