OGRE  2.0
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 {
45  class PCZFrustum;
46  struct VisibleObjectsBoundsInfo;
47 
49  {
50  public:
51  DefaultZone( PCZSceneManager *, const String& );
52  ~DefaultZone();
53 
56  void setEnclosureNode(PCZSceneNode *);
57 
63  void _addNode( PCZSceneNode * );
64 
67  void removeNode( PCZSceneNode * );
68 
72  bool requiresZoneSpecificNodeData(void);
73 
76  void _checkNodeAgainstPortals(PCZSceneNode *, Portal * );
77 
80  void _checkLightAgainstPortals(PCZLight *,
81  unsigned long,
82  PCZFrustum *,
83  Portal *);
84 
85  /* Update the zone data for each portal
86  */
87  void updatePortalsZoneData(void);
88 
90  void dirtyNodeByMovingPortals(void);
91 
92  /* Update a node's home zone */
93  PCZone * updateNodeHomeZone(PCZSceneNode * pczsn, bool allowBackTouces);
94 
100  void findVisibleNodes(PCZCamera *,
101  NodeList & visibleNodeList,
102  RenderQueue * queue,
103  VisibleObjectsBoundsInfo* visibleBounds,
104  bool onlyShadowCasters,
105  bool displayNodes,
106  bool showBoundingBoxes);
107 
108  /* Functions for finding Nodes that intersect various shapes */
109  void _findNodes( const AxisAlignedBox &t,
111  PortalList &visitedPortals,
112  bool includeVisitors,
113  bool recurseThruPortals,
114  PCZSceneNode *exclude);
115  void _findNodes( const Sphere &t,
116  PCZSceneNodeList &list,
117  PortalList &visitedPortals,
118  bool includeVisitors,
119  bool recurseThruPortals,
120  PCZSceneNode *exclude );
121  void _findNodes( const PlaneBoundedVolume &t,
122  PCZSceneNodeList &list,
123  PortalList &visitedPortals,
124  bool includeVisitors,
125  bool recurseThruPortals,
126  PCZSceneNode *exclude );
127  void _findNodes( const Ray &t,
128  PCZSceneNodeList &list,
129  PortalList &visitedPortals,
130  bool includeVisitors,
131  bool recurseThruPortals,
132  PCZSceneNode *exclude );
133 
135  bool setOption( const String &, const void * );
136 
140  void notifyCameraCreated( Camera* c );
141  /* called by PCZSM during setWorldGeometryRenderQueue() */
142  virtual void notifyWorldGeometryRenderQueue(uint8 qid);
143  /* Called when a _renderScene is called in the SceneManager */
144  virtual void notifyBeginRenderScene(void);
145  /* called by PCZSM during setZoneGeometry() */
146  virtual void setZoneGeometry(const String &filename, PCZSceneNode * parentNode);
147 
148  protected:
149 
150  };
151 
152 }
153 
154 #endif
155 
156 
157 
vector< SceneNode * >::type NodeList
Definition: OgrePCZone.h:74
Representation of a ray in space, i.e.
Definition: OgreRay.h:45
unsigned char uint8
Definition: OgrePlatform.h:422
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:82
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
Definition: OgreCommon.h:53
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:52