OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgrePCZCamera.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-2013 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 PCZCamera.h - description
28 -----------------------------------------------------------------------------
29 begin : Wed Feb 21 2007
30 author : Eric Cha
31 email : ericc@xenopi.com
32 Code Style Update :
33 -----------------------------------------------------------------------------
34 */
35 
36 #ifndef PCZCAMERA_H
37 #define PCZCAMERA_H
38 
39 #include <OgreCamera.h>
40 #include "OgrePCPlane.h"
41 #include "OgrePortalBase.h"
42 #include "OgrePCZFrustum.h"
43 #include "OgrePCZPrerequisites.h"
44 
45 namespace Ogre
46 {
47  #define MAX_EXTRA_CULLING_PLANES 40
48 
49  class PCZone;
50 
51 
57  {
58  public:
61  {
64  FULL
65  };
66 
67  /* Standard constructor */
68  PCZCamera( const String& name, SceneManager* sm );
69  /* Standard destructor */
70  ~PCZCamera();
71 
76  virtual const AxisAlignedBox& getBoundingBox(void) const;
77 
78  /* Overridden isVisible function for aabb */
79  virtual bool isVisible( const AxisAlignedBox &bound, FrustumPlane *culledBy=0) const;
80 
81  /* isVisible() function for portals */
82  bool isVisible(PortalBase* portal, FrustumPlane* culledBy = 0) const;
83 
86  bool isVisibile( const AxisAlignedBox &bound );
87 
90  PCZCamera::Visibility getVisibility( const AxisAlignedBox &bound );
91 
93  void setProjectionType(ProjectionType pt);
94 
95  /* Update function (currently used for making sure the origin stuff for the
96  extra culling frustum is up to date */
97  void update(void);
98 
99  // calculate extra culling planes from portal and camera
100  // origin and add to list of extra culling planes
101  int addPortalCullingPlanes(PortalBase* portal);
102  // remove extra culling planes created from the given portal
103  void removePortalCullingPlanes(PortalBase* portal);
104  // remove all extra culling planes
105  void removeAllExtraCullingPlanes(void);
106  protected:
109  };
110 
111 }
112 
113 #endif
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
Specialized frustum shaped culling volume that has culling planes created from portals.
Manages the organisation and rendering of a 'scene' i.e.
A 3D box aligned with the x/y/z axes.
PortalBase - Base class to Portal and AntiPortal classes.
ProjectionType
Specifies perspective (realistic) or orthographic (architectural) projection.
Definition: OgreFrustum.h:63
AxisAlignedBox mBox
#define _OgrePCZPluginExport
PCZFrustum mExtraCullingFrustum
FrustumPlane
Worldspace clipping planes.
Definition: OgreFrustum.h:71
_StringBase String
Visibility
Visibility types.
Definition: OgrePCZCamera.h:60
Specialized viewpoint from which an PCZone Scene can be rendered.
Definition: OgrePCZCamera.h:56