~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to src/components/ogre/environment/caelum/include/CaelumListener.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-07-23 07:46:40 UTC
  • Revision ID: james.westby@ubuntu.com-20090723074640-wh0ukzis0kda36qv
Tags: upstream-0.5.6
Import upstream version 0.5.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
This file is part of Caelum.
 
3
See http://www.ogre3d.org/wiki/index.php/Caelum 
 
4
 
 
5
Copyright (c) 2006-2007 Caelum team. See Contributors.txt for details.
 
6
 
 
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.
 
11
 
 
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.
 
16
 
 
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/>.
 
19
*/
 
20
 
 
21
#ifndef CAELUMLISTENER_H
 
22
#define CAELUMLISTENER_H
 
23
 
 
24
#include "CaelumPrerequisites.h"
 
25
 
 
26
namespace caelum {
 
27
 
 
28
// Predefinition of the system for the crossed reference.
 
29
class CaelumSystem;
 
30
 
 
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 
 
35
        itself.
 
36
        @author Jesús Alonso Abad
 
37
        @version 1.0
 
38
 */
 
39
class DllExport CaelumListener {
 
40
// Methods --------------------------------------------------------------------
 
41
        public: 
 
42
                /** Destructor.
 
43
                 */
 
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.
 
51
                 */
 
52
                virtual bool caelumStarted (const Ogre::FrameEvent &e, CaelumSystem *caelumSystem) {
 
53
                        return true;
 
54
                }
 
55
 
 
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.
 
62
                 */
 
63
                virtual bool caelumFinished (const Ogre::FrameEvent &e, CaelumSystem *caelumSystem) {
 
64
                        return true;
 
65
                }
 
66
};
 
67
 
 
68
} // namespace caelum
 
69
 
 
70
#endif //CAELUMLISTENER_H