OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreDefaultZone.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 DefaultZone.h - Default implementation of PCZone header file.
28 
29 Default Implementation of PCZone
30 -----------------------------------------------------------------------------
31 begin : Tue Feb 20 2007
32 author : Eric Cha
33 email : ericc@xenopi.com
34 Code Style Update :
35 -----------------------------------------------------------------------------
36 */
37 
38 #ifndef DEFAULTZONE_H
39 #define DEFAULTZONE_H
40 
41 #include "OgrePCZone.h"
42 
43 namespace Ogre
44 {
46  {
47  public:
48  DefaultZone( PCZSceneManager *, const String& );
49  ~DefaultZone();
50 
53  void setEnclosureNode(PCZSceneNode *);
54 
60  void _addNode( PCZSceneNode * );
61 
64  void removeNode( PCZSceneNode * );
65 
69  bool requiresZoneSpecificNodeData(void);
70 
73  void _checkNodeAgainstPortals(PCZSceneNode *, Portal * );
74 
77  void _checkLightAgainstPortals(PCZLight *,
78  unsigned long,
79  PCZFrustum *,
80  Portal *);
81 
82  /* Update the zone data for each portal
83  */
84  void updatePortalsZoneData(void);
85 
87  void dirtyNodeByMovingPortals(void);
88 
89  /* Update a node's home zone */
90  PCZone * updateNodeHomeZone(PCZSceneNode * pczsn, bool allowBackTouces);
91 
97  void findVisibleNodes(PCZCamera *,
98  NodeList & visibleNodeList,
99  RenderQueue * queue,
100  VisibleObjectsBoundsInfo* visibleBounds,
101  bool onlyShadowCasters,
102  bool displayNodes,
103  bool showBoundingBoxes);
104 
105  /* Functions for finding Nodes that intersect various shapes */
106  void _findNodes( const AxisAlignedBox &t,
108  PortalList &visitedPortals,
109  bool includeVisitors,
110  bool recurseThruPortals,
111  PCZSceneNode *exclude);
112  void _findNodes( const Sphere &t,
113  PCZSceneNodeList &list,
114  PortalList &visitedPortals,
115  bool includeVisitors,
116  bool recurseThruPortals,
117  PCZSceneNode *exclude );
118  void _findNodes( const PlaneBoundedVolume &t,
119  PCZSceneNodeList &list,
120  PortalList &visitedPortals,
121  bool includeVisitors,
122  bool recurseThruPortals,
123  PCZSceneNode *exclude );
124  void _findNodes( const Ray &t,
125  PCZSceneNodeList &list,
126  PortalList &visitedPortals,
127  bool includeVisitors,
128  bool recurseThruPortals,
129  PCZSceneNode *exclude );
130 
132  bool setOption( const String &, const void * );
133 
137  void notifyCameraCreated( Camera* c );
138  /* called by PCZSM during setWorldGeometryRenderQueue() */
139  virtual void notifyWorldGeometryRenderQueue(uint8 qid);
140  /* Called when a _renderScene is called in the SceneManager */
141  virtual void notifyBeginRenderScene(void);
142  /* called by PCZSM during setZoneGeometry() */
143  virtual void setZoneGeometry(const String &filename, PCZSceneNode * parentNode);
144 
145  protected:
146 
147  };
148 
149 }
150 
151 #endif
152 
153 
154 
vector< SceneNode * >::type NodeList
Definition: OgrePCZone.h:74
Representation of a ray in space, i.e.
Definition: OgreRay.h:46
unsigned char uint8
Definition: OgrePlatform.h:346
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
set< PCZSceneNode * >::type PCZSceneNodeList
Specialized frustum shaped culling volume that has culling planes created from portals.
A 3D box aligned with the x/y/z axes.
Portal datastructure for connecting zones.
Definition: OgrePortal.h:51
Specialized version of Ogre::Light which caches which zones the light affects.
Definition: OgrePCZLight.h:51
A sphere primitive, mostly used for bounds checking.
Definition: OgreSphere.h:51
#define _OgrePCZPluginExport
Represents a convex volume bounded by planes.
list< Portal * >::type PortalList
Definition: OgrePCZone.h:71
Class to manage the scene object rendering queue.
Portal-Connected Zone datastructure for managing scene nodes.
Definition: OgrePCZone.h:81
_StringBase String
Structure collecting together information about the visible objects that have been discovered in a sc...
Specialized SceneManager that uses Portal-Connected-Zones to divide the scene spatially.
Specialized viewpoint from which an PCZone Scene can be rendered.
Definition: OgrePCZCamera.h:54