2
This file is part of Caelum.
3
See http://www.ogre3d.org/wiki/index.php/Caelum
5
Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details.
7
Caelum is free software: you can redistribute it and/or modify
8
it under the terms of the GNU Lesser General Public License as published
9
by the Free Software Foundation, either version 3 of the License, or
10
(at your option) any later version.
12
Caelum is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU Lesser General Public License for more details.
17
You should have received a copy of the GNU Lesser General Public License
18
along with Caelum. If not, see <http://www.gnu.org/licenses/>.
21
#ifndef CAELUMLISTENER_H
22
#define CAELUMLISTENER_H
24
#include "CaelumPrerequisites.h"
28
// Predefinition of the system for the crossed reference.
31
/** The Caelum listener interface.
32
Allows to register its subclasses to Caelum so that it receives notifications each frame
33
before it's started or finished. Useful, for instance, to prototype certain functionality
34
like passing the sun direction to a shader/material that isn't defined inside Caelum
36
@author Jesús Alonso Abad
39
class DllExport CaelumListener {
40
// Methods --------------------------------------------------------------------
44
virtual ~CaelumListener () {};
45
/** Trigger fired just before Caelum is about to do its work.
46
@param e The Ogre FrameEvent object, in case it's desired to use this as a
47
FrameListener as well.
48
@param caelumSystem A reference to the invoker (the Caelum system) itself in case some
49
operations on it are wanted to be done.
50
@return True if it's desired to continue running Caelum.
52
virtual bool caelumStarted (const Ogre::FrameEvent &e, CaelumSystem *caelumSystem) {
56
/** Trigger fired just after Caelum is about to do its work.
57
@param e The Ogre FrameEvent object, in case it's desired to use this as a
58
FrameListener as well.
59
@param caelumSystem A reference to the invoker (the Caelum system) itself in case some
60
operations on it are wanted to be done.
61
@return True if it's desired to continue running after Caelum finished.
63
virtual bool caelumFinished (const Ogre::FrameEvent &e, CaelumSystem *caelumSystem) {
70
#endif //CAELUMLISTENER_H