IBillboardTextSceneNode.h 2.0 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 __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
  5. #define __I_BILLBOARD_TEXT_SCENE_NODE_H_INCLUDED__
  6. #include "IBillboardSceneNode.h"
  7. namespace irr
  8. {
  9. namespace scene
  10. {
  11. //! A billboard text scene node.
  12. /** Acts like a billboard which displays the currently set text.
  13. Due to the exclusion of RTTI in Irrlicht we have to avoid multiple
  14. inheritance. Hence, changes to the ITextSceneNode interface have
  15. to be copied here manually.
  16. */
  17. class IBillboardTextSceneNode : public IBillboardSceneNode
  18. {
  19. public:
  20. //! Constructor
  21. IBillboardTextSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
  22. const core::vector3df& position = core::vector3df(0,0,0))
  23. : IBillboardSceneNode(parent, mgr, id, position) {}
  24. //! Sets the size of the billboard.
  25. virtual void setSize(const core::dimension2d<f32>& size) = 0;
  26. //! Returns the size of the billboard.
  27. virtual const core::dimension2d<f32>& getSize() const = 0;
  28. //! Set the color of all vertices of the billboard
  29. /** \param overallColor: the color to set */
  30. virtual void setColor(const video::SColor & overallColor) = 0;
  31. //! Set the color of the top and bottom vertices of the billboard
  32. /** \param topColor: the color to set the top vertices
  33. \param bottomColor: the color to set the bottom vertices */
  34. virtual void setColor(const video::SColor & topColor, const video::SColor & bottomColor) = 0;
  35. //! Gets the color of the top and bottom vertices of the billboard
  36. /** \param topColor: stores the color of the top vertices
  37. \param bottomColor: stores the color of the bottom vertices */
  38. virtual void getColor(video::SColor & topColor, video::SColor & bottomColor) const = 0;
  39. //! sets the text string
  40. virtual void setText(const wchar_t* text) = 0;
  41. //! sets the color of the text
  42. virtual void setTextColor(video::SColor color) = 0;
  43. };
  44. } // end namespace scene
  45. } // end namespace irr
  46. #endif