ILightManager.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. // Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt
  2. // Copyright (C) 2008-2012 Nikolaus Gebhardt
  3. // This file is part of the "Irrlicht Engine".
  4. // For conditions of distribution and use, see copyright notice in irrlicht.h
  5. #ifndef __I_LIGHT_MANAGER_H_INCLUDED__
  6. #define __I_LIGHT_MANAGER_H_INCLUDED__
  7. #include "IReferenceCounted.h"
  8. #include "irrArray.h"
  9. namespace irr
  10. {
  11. namespace scene
  12. {
  13. class ILightSceneNode;
  14. //! ILightManager provides an interface for user applications to manipulate the list of lights in the scene.
  15. /** The light list can be trimmed or re-ordered before device/ hardware
  16. lights are created, and/or individual lights can be switched on and off
  17. before or after each scene node is rendered. It is assumed that the
  18. ILightManager implementation will store any data that it wishes to
  19. retain, i.e. the ISceneManager to which it is assigned, the lightList,
  20. the current render pass, and the current scene node. */
  21. class ILightManager : public IReferenceCounted
  22. {
  23. public:
  24. //! Called after the scene's light list has been built, but before rendering has begun.
  25. /** As actual device/hardware lights are not created until the
  26. ESNRP_LIGHT render pass, this provides an opportunity for the
  27. light manager to trim or re-order the light list, before any
  28. device/hardware lights have actually been created.
  29. \param lightList: the Scene Manager's light list, which
  30. the light manager may modify. This reference will remain valid
  31. until OnPostRender().
  32. */
  33. virtual void OnPreRender(core::array<ISceneNode*> & lightList) = 0;
  34. //! Called after the last scene node is rendered.
  35. /** After this call returns, the lightList passed to OnPreRender() becomes invalid. */
  36. virtual void OnPostRender(void) = 0;
  37. //! Called before a render pass begins
  38. /** \param renderPass: the render pass that's about to begin */
  39. virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0;
  40. //! Called after the render pass specified in OnRenderPassPreRender() ends
  41. /** \param[in] renderPass: the render pass that has finished */
  42. virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) = 0;
  43. //! Called before the given scene node is rendered
  44. /** \param[in] node: the scene node that's about to be rendered */
  45. virtual void OnNodePreRender(ISceneNode* node) = 0;
  46. //! Called after the the node specified in OnNodePreRender() has been rendered
  47. /** \param[in] node: the scene node that has just been rendered */
  48. virtual void OnNodePostRender(ISceneNode* node) = 0;
  49. };
  50. } // end namespace scene
  51. } // end namespace irr
  52. #endif