OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgrePCZLight.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 PCZLight.h - description
28 -----------------------------------------------------------------------------
29 begin : Wed May 23 2007
30 author : Eric Cha
31 email : ericc@xenopi.com
32 Code Style Update :
33 -----------------------------------------------------------------------------
34 */
35 
36 #ifndef PCZLIGHT_H
37 #define PCZLIGHT_H
38 
39 #include "OgreLight.h"
40 #include "OgrePCZPrerequisites.h"
41 
42 namespace Ogre
43 {
44  class PCZone;
45 
47 
52  {
53  public:
56  PCZLight();
57 
60  PCZLight(const String& name);
61 
64  ~PCZLight();
65 
67  const String& getMovableType(void) const;
68 
71  void clearAffectedZones(void);
72 
75  void addZoneToAffectedZonesList(PCZone * zone);
76 
79  bool affectsZone(PCZone * zone);
80 
84  bool affectsVisibleZone(void) {return mAffectsVisibleZone;}
85 
87  void setAffectsVisibleZone(bool affects) { mAffectsVisibleZone = affects; }
88 
91  void updateZones(PCZone * defaultZone, unsigned long frameCount);
92 
94  void removeZoneFromAffectedZonesList(PCZone * zone);
95 
97  virtual void _notifyMoved(void);
98 
100  void clearNeedsUpdate(void) { mNeedsUpdate = false; }
101 
103  bool getNeedsUpdate(void);
104 
105  protected:
110 
114 
117  };
118 
121  {
122  protected:
123  MovableObject* createInstanceImpl( const String& name, const NameValuePairList* params);
124  public:
127 
129 
130  const String& getType(void) const;
131  void destroyInstance( MovableObject* obj);
132 
133  };
134 
135 
136 } // Namespace
137 #endif
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:580
list< PCZone * >::type ZoneList
Definition: OgrePCZLight.h:44
ZoneList affectedZonesList
List of PCZones which are affected by the light.
Definition: OgrePCZLight.h:113
Interface definition for a factory class which produces a certain kind of MovableObject, and can be registered with Root in order to allow all clients to produce new instances of this object, integrated with the standard Ogre processing.
bool affectsVisibleZone(void)
Definition: OgrePCZLight.h:84
void clearNeedsUpdate(void)
Clear update flag.
Definition: OgrePCZLight.h:100
Abstract class defining a movable object in a scene.
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:70
void setAffectsVisibleZone(bool affects)
Marks a light as affecting a visible zone.
Definition: OgrePCZLight.h:87
bool mAffectsVisibleZone
Flag indicating if any of the zones in the affectedZonesList is visible in the current frame...
Definition: OgrePCZLight.h:109
Specialized version of Ogre::Light which caches which zones the light affects.
Definition: OgrePCZLight.h:51
Factory object for creating PCZLight instances.
Definition: OgrePCZLight.h:120
#define _OgrePCZPluginExport
bool mNeedsUpdate
Flag recording if light has moved, therefore affected list needs updating.
Definition: OgrePCZLight.h:116
static String FACTORY_TYPE_NAME
Definition: OgrePCZLight.h:128
Portal-Connected Zone datastructure for managing scene nodes.
Definition: OgrePCZone.h:81
_StringBase String
Definition: OgreCommon.h:53