CGUIMeshViewer.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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_GUI_MESH_VIEWER_H_INCLUDED__
  5. #define __C_GUI_MESH_VIEWER_H_INCLUDED__
  6. #include "IrrCompileConfig.h"
  7. #ifdef _IRR_COMPILE_WITH_GUI_
  8. #include "IGUIMeshViewer.h"
  9. #include "SMaterial.h"
  10. namespace irr
  11. {
  12. namespace gui
  13. {
  14. class CGUIMeshViewer : public IGUIMeshViewer
  15. {
  16. public:
  17. //! constructor
  18. CGUIMeshViewer(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect<s32> rectangle);
  19. //! destructor
  20. virtual ~CGUIMeshViewer();
  21. //! sets the mesh to be shown
  22. virtual void setMesh(scene::IAnimatedMesh* mesh);
  23. //! Gets the displayed mesh
  24. virtual scene::IAnimatedMesh* getMesh() const;
  25. //! sets the material
  26. virtual void setMaterial(const video::SMaterial& material);
  27. //! gets the material
  28. virtual const video::SMaterial& getMaterial() const;
  29. //! called if an event happened.
  30. virtual bool OnEvent(const SEvent& event);
  31. //! draws the element and its children
  32. virtual void draw();
  33. private:
  34. video::SMaterial Material;
  35. scene::IAnimatedMesh* Mesh;
  36. };
  37. } // end namespace gui
  38. } // end namespace irr
  39. #endif // _IRR_COMPILE_WITH_GUI_
  40. #endif // __C_GUI_MESH_VIEWER_H_INCLUDED__