+// Written by Colin MacDonald - all rights assigned to Nikolaus Gebhardt\r
+// Copyright (C) 2008-2012 Nikolaus Gebhardt\r
+// This file is part of the "Irrlicht Engine".\r
+// For conditions of distribution and use, see copyright notice in irrlicht.h\r
+\r
+#ifndef IRR_I_LIGHT_MANAGER_H_INCLUDED\r
+#define IRR_I_LIGHT_MANAGER_H_INCLUDED\r
+\r
+#include "IReferenceCounted.h"\r
+#include "irrArray.h"\r
+#include "ISceneManager.h" // for E_SCENE_NODE_RENDER_PASS, could probably move that to own header?\r
+\r
+namespace irr\r
+{\r
+namespace scene\r
+{\r
+ class ISceneNode;\r
+\r
+ //! ILightManager provides an interface for user applications to manipulate the list of lights in the scene.\r
+ /** The light list can be trimmed or re-ordered before device/ hardware\r
+ lights are created, and/or individual lights can be switched on and off\r
+ before or after each scene node is rendered. It is assumed that the\r
+ ILightManager implementation will store any data that it wishes to\r
+ retain, i.e. the ISceneManager to which it is assigned, the lightList,\r
+ the current render pass, and the current scene node. \r
+ \r
+ It can also be useful for shaders as it allows finding out the currently rendered SceneNode.\r
+ */\r
+ class ILightManager : public IReferenceCounted\r
+ {\r
+ public:\r
+ //! Called after the scene's light list has been built, but before rendering has begun.\r
+ /** As actual device/hardware lights are not created until the\r
+ ESNRP_LIGHT render pass, this provides an opportunity for the\r
+ light manager to trim or re-order the light list, before any\r
+ device/hardware lights have actually been created.\r
+ \param lightList: the Scene Manager's light list, which\r
+ the light manager may modify. This reference will remain valid\r
+ until OnPostRender().\r
+ */\r
+ virtual void OnPreRender(core::array<ISceneNode*> & lightList) {};\r
+\r
+ //! Called after the last scene node is rendered.\r
+ /** After this call returns, the lightList passed to OnPreRender() becomes invalid. */\r
+ virtual void OnPostRender(void) {};\r
+\r
+ //! Called before a render pass begins\r
+ /** \param renderPass: the render pass that's about to begin */\r
+ virtual void OnRenderPassPreRender(E_SCENE_NODE_RENDER_PASS renderPass) {};\r
+\r
+ //! Called after the render pass specified in OnRenderPassPreRender() ends\r
+ /** \param[in] renderPass: the render pass that has finished */\r
+ virtual void OnRenderPassPostRender(E_SCENE_NODE_RENDER_PASS renderPass) {};\r
+\r
+ //! Called before the given scene node is rendered\r
+ /** \param[in] node: the scene node that's about to be rendered */\r
+ virtual void OnNodePreRender(ISceneNode* node) {};\r
+\r
+ //! Called after the the node specified in OnNodePreRender() has been rendered\r
+ /** \param[in] node: the scene node that has just been rendered */\r
+ virtual void OnNodePostRender(ISceneNode* node) {};\r
+ };\r
+} // end namespace scene\r
+} // end namespace irr\r
+\r
+#endif\r