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