OgreCamera.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 */
28 #ifndef __Camera_H__
29 #define __Camera_H__
30 
31 // Default options
32 #include "OgrePrerequisites.h"
33 
34 #include "OgreString.h"
35 #include "OgreMovableObject.h"
36 
37 // Matrices & Vectors
38 #include "OgreMatrix4.h"
39 #include "OgreVector3.h"
40 #include "OgrePlane.h"
41 #include "OgreQuaternion.h"
42 #include "OgreCommon.h"
43 #include "OgreFrustum.h"
44 #include "OgreRay.h"
45 #include "OgrePlaneBoundedVolume.h"
46 #include "OgreHeaderPrefix.h"
47 
48 
49 namespace Ogre {
50 
86  class _OgreExport Camera : public Frustum
87  {
88  public:
92  {
93  public:
94  Listener() {}
95  virtual ~Listener() {}
96 
98  virtual void cameraPreRenderScene(Camera* cam)
99  { (void)cam; }
100 
102  virtual void cameraPostRenderScene(Camera* cam)
103  { (void)cam; }
104 
106  virtual void cameraDestroyed(Camera* cam)
107  { (void)cam; }
108 
109  };
110  protected:
113 
116 
119 
123 
127 
129  bool mYawFixed;
132 
135 
137  unsigned int mVisFacesLastRender;
138 
140  unsigned int mVisBatchesLastRender;
141 
144 
149 
154 
155 
160  Real mWLeft, mWTop, mWRight, mWBottom;
166  mutable bool mRecalcWindow;
179 
184 
187 
188 
189  // Internal functions for calcs
190  bool isViewOutOfDate(void) const;
192  void invalidateFrustum(void) const;
194  void invalidateView(void) const;
195 
196 
201  virtual void setWindowImpl(void) const;
202 
204  virtual vector<Vector4>::type getRayForwardIntersect(const Vector3& anchor, const Vector3 *dir, Real planeOffset) const;
205 
206  public:
209  Camera( const String& name, SceneManager* sm);
210 
213  virtual ~Camera();
214 
216  virtual void addListener(Listener* l);
218  virtual void removeListener(Listener* l);
219 
223 
232 
236 
239  void setPosition(Real x, Real y, Real z);
240 
243  void setPosition(const Vector3& vec);
244 
247  const Vector3& getPosition(void) const;
248 
251  void move(const Vector3& vec);
252 
255  void moveRelative(const Vector3& vec);
256 
262  void setDirection(Real x, Real y, Real z);
263 
266  void setDirection(const Vector3& vec);
267 
270  Vector3 getDirection(void) const;
271 
274  Vector3 getUp(void) const;
275 
278  Vector3 getRight(void) const;
279 
288  void lookAt( const Vector3& targetPoint );
301  void lookAt(Real x, Real y, Real z);
302 
305  void roll(const Radian& angle);
306 
309  void yaw(const Radian& angle);
310 
313  void pitch(const Radian& angle);
314 
317  void rotate(const Vector3& axis, const Radian& angle);
318 
321  void rotate(const Quaternion& q);
322 
342  void setFixedYawAxis( bool useFixed, const Vector3& fixedAxis = Vector3::UNIT_Y );
343 
344 
347  const Quaternion& getOrientation(void) const;
348 
351  void setOrientation(const Quaternion& q);
352 
357  void _renderScene(Viewport *vp, bool includeOverlays);
358 
361  _OgreExport friend std::ostream& operator<<(std::ostream& o, const Camera& c);
362 
365  void _notifyRenderedFaces(unsigned int numfaces);
366 
369  void _notifyRenderedBatches(unsigned int numbatches);
370 
373  unsigned int _getNumRenderedFaces(void) const;
374 
377  unsigned int _getNumRenderedBatches(void) const;
378 
381  const Quaternion& getDerivedOrientation(void) const;
384  const Vector3& getDerivedPosition(void) const;
390  Vector3 getDerivedUp(void) const;
394 
397  const Quaternion& getRealOrientation(void) const;
400  const Vector3& getRealPosition(void) const;
406  Vector3 getRealUp(void) const;
409  Vector3 getRealRight(void) const;
410 
412  void getWorldTransforms(Matrix4* mat) const;
413 
415  const String& getMovableType(void) const;
416 
436  void setAutoTracking(bool enabled, SceneNode* const target = 0,
437  const Vector3& offset = Vector3::ZERO);
438 
439 
455  void setLodBias(Real factor = 1.0);
456 
461  Real getLodBias(void) const;
462 
475  virtual void setLodCamera(const Camera* lodCam);
476 
483  virtual const Camera* getLodCamera() const;
484 
485 
490  Ray getCameraToViewportRay(Real screenx, Real screeny) const;
496  void getCameraToViewportRay(Real screenx, Real screeny, Ray* outRay) const;
497 
509  Real screenTop, Real screenRight, Real screenBottom, bool includeFarPlane = false);
510 
523  Real screenTop, Real screenRight, Real screenBottom,
524  PlaneBoundedVolume* outVolume, bool includeFarPlane = false);
525 
528 
529 
531  void _autoTrack(void);
532 
533 
543  virtual void setWindow (Real left, Real top, Real right, Real bottom);
545  virtual void resetWindow (void);
547  virtual bool isWindowSet(void) const { return mWindowSet; }
550 
552  Real getBoundingRadius(void) const;
554  SceneNode* getAutoTrackTarget(void) const { return mAutoTrackTarget; }
556  const Vector3& getAutoTrackOffset(void) const { return mAutoTrackOffset; }
557 
563  Viewport* getViewport(void) const {return mLastViewport;}
565  void _notifyViewport(Viewport* viewport) {mLastViewport = viewport;}
566 
574  void setAutoAspectRatio(bool autoratio);
575 
578  bool getAutoAspectRatio(void) const;
579 
591  void setCullingFrustum(Frustum* frustum) { mCullFrustum = frustum; }
593  Frustum* getCullingFrustum(void) const { return mCullFrustum; }
594 
599  virtual void forwardIntersect(const Plane& worldPlane, vector<Vector4>::type* intersect3d) const;
600 
602  bool isVisible(const AxisAlignedBox& bound, FrustumPlane* culledBy = 0) const;
604  bool isVisible(const Sphere& bound, FrustumPlane* culledBy = 0) const;
606  bool isVisible(const Vector3& vert, FrustumPlane* culledBy = 0) const;
608  const Vector3* getWorldSpaceCorners(void) const;
610  const Plane& getFrustumPlane( unsigned short plane ) const;
612  bool projectSphere(const Sphere& sphere,
613  Real* left, Real* top, Real* right, Real* bottom) const;
619  const Matrix4& getViewMatrix(void) const;
628  const Matrix4& getViewMatrix(bool ownFrustumOnly) const;
634  virtual void setUseRenderingDistance(bool use) { mUseRenderingDistance = use; }
638  virtual bool getUseRenderingDistance(void) const { return mUseRenderingDistance; }
639 
646  virtual void synchroniseBaseSettingsWith(const Camera* cam);
647 
649  const Vector3& getPositionForViewUpdate(void) const;
652 
657  void setUseMinPixelSize(bool enable) { mUseMinPixelSize = enable; }
661  bool getUseMinPixelSize() const { return mUseMinPixelSize; }
662 
673  Real getPixelDisplayRatio() const { return mPixelDisplayRatio; }
674 
675  };
679 } // namespace Ogre
680 
681 #include "OgreHeaderSuffix.h"
682 
683 #endif // __Camera_H__
OgreHeaderSuffix.h
Ogre::Vector3::UNIT_Y
static const Vector3 UNIT_Y
Definition: OgreVector3.h:802
Ogre::Camera::_getNumRenderedBatches
unsigned int _getNumRenderedBatches(void) const
Internal method to retrieve the number of visible batches in the last render.
Ogre::Camera::setLodBias
void setLodBias(Real factor=1.0)
Sets the level-of-detail factor for this Camera.
Ogre::Camera::Listener::cameraPreRenderScene
virtual void cameraPreRenderScene(Camera *cam)
Called prior to the scene being rendered with this camera.
Definition: OgreCamera.h:98
Ogre::Camera::mSceneDetail
PolygonMode mSceneDetail
Rendering type.
Definition: OgreCamera.h:134
Ogre::Camera::getUseMinPixelSize
bool getUseMinPixelSize() const
Returns whether to use min display size calculations.
Definition: OgreCamera.h:661
Ogre::Camera::getCameraToViewportBoxVolume
void getCameraToViewportBoxVolume(Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, PlaneBoundedVolume *outVolume, bool includeFarPlane=false)
Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
Ogre::Camera::getAutoTrackTarget
SceneNode * getAutoTrackTarget(void) const
Get the auto tracking target for this camera, if any.
Definition: OgreCamera.h:554
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::Camera::mSceneLodFactor
Real mSceneLodFactor
Scene LOD factor used to adjust overall LOD.
Definition: OgreCamera.h:151
Ogre::Plane
Defines a plane in 3D space.
Definition: OgrePlane.h:62
Ogre::Camera::getSceneManager
SceneManager * getSceneManager(void) const
Returns a pointer to the SceneManager this camera is rendering through.
Ogre::Camera::_autoTrack
void _autoTrack(void)
Internal method used by OGRE to update auto-tracking cameras.
Ogre::Camera::mRealOrientation
Quaternion mRealOrientation
Real world orientation/position of the camera.
Definition: OgreCamera.h:125
Ogre::Camera::removeListener
virtual void removeListener(Listener *l)
Remove a listener to this camera.
Ogre::Camera::setPosition
void setPosition(Real x, Real y, Real z)
Sets the camera's position.
Ogre::Camera::_notifyRenderedFaces
void _notifyRenderedFaces(unsigned int numfaces)
Internal method to notify camera of the visible faces in the last render.
Ogre::Camera::getOrientationForViewUpdate
const Quaternion & getOrientationForViewUpdate(void) const
Get the derived orientation of this frustum.
Ogre::Camera::setAutoAspectRatio
void setAutoAspectRatio(bool autoratio)
If set to true a viewport that owns this frustum will be able to recalculate the aspect ratio wheneve...
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::Camera::getRayForwardIntersect
virtual vector< Vector4 >::type getRayForwardIntersect(const Vector3 &anchor, const Vector3 *dir, Real planeOffset) const
Helper function for forwardIntersect that intersects rays with canonical plane.
Ogre::Camera::forwardIntersect
virtual void forwardIntersect(const Plane &worldPlane, vector< Vector4 >::type *intersect3d) const
Forward projects frustum rays to find forward intersection with plane.
Ogre::Camera::_notifyViewport
void _notifyViewport(Viewport *viewport)
Notifies this camera that a viewport is using it.
Definition: OgreCamera.h:565
Ogre::Camera::getDerivedDirection
Vector3 getDerivedDirection(void) const
Gets the derived direction vector of the camera, including any rotation inherited from a node attachm...
Ogre::Camera::getAutoTrackOffset
const Vector3 & getAutoTrackOffset(void) const
Get the auto tracking offset for this camera, if it is auto tracking.
Definition: OgreCamera.h:556
Ogre::Camera::rotate
void rotate(const Vector3 &axis, const Radian &angle)
Rotate the camera around an arbitrary axis.
Ogre::Camera::setCullingFrustum
void setCullingFrustum(Frustum *frustum)
Tells the camera to use a separate Frustum instance to perform culling.
Definition: OgreCamera.h:591
Ogre::Camera::setLodCamera
virtual void setLodCamera(const Camera *lodCam)
Set a pointer to the camera which should be used to determine LOD settings.
Ogre::Camera::resetWindow
virtual void resetWindow(void)
Cancel view window.
Ogre::Camera::Listener::Listener
Listener()
Definition: OgreCamera.h:94
Ogre::Camera::mUseRenderingDistance
bool mUseRenderingDistance
Whether or not the rendering distance of objects should take effect for this camera.
Definition: OgreCamera.h:176
Ogre::Camera::mListeners
ListenerList mListeners
Definition: OgreCamera.h:186
Ogre::Camera::getFarClipDistance
Real getFarClipDistance(void) const
Retrieves the distance from the frustum to the far clipping plane.
Ogre::Camera::mVisBatchesLastRender
unsigned int mVisBatchesLastRender
Stored number of visible batches in the last render.
Definition: OgreCamera.h:140
OgreRay.h
Ogre::Camera::mRecalcWindow
bool mRecalcWindow
Was viewing window changed.
Definition: OgreCamera.h:166
OgreQuaternion.h
Ogre::Camera::mYawFixedAxis
Vector3 mYawFixedAxis
Fixed axis to yaw around.
Definition: OgreCamera.h:131
Ogre::Camera::getUseRenderingDistance
virtual bool getUseRenderingDistance(void) const
Get whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
Definition: OgreCamera.h:638
Ogre::Camera::mWindowSet
bool mWindowSet
Is viewing window used.
Definition: OgreCamera.h:162
Ogre::Camera::setOrientation
void setOrientation(const Quaternion &q)
Sets the camera's orientation.
Ogre::Camera::getRealDirection
Vector3 getRealDirection(void) const
Gets the real world direction vector of the camera, including any rotation inherited from a node atta...
Ogre::Camera::mWindowClipPlanes
vector< Plane >::type mWindowClipPlanes
Windowed viewport clip planes.
Definition: OgreCamera.h:164
Ogre::Camera::invalidateFrustum
void invalidateFrustum(void) const
Signal to update frustum information.
Ogre::Camera::getRealOrientation
const Quaternion & getRealOrientation(void) const
Gets the real world orientation of the camera, including any rotation inherited from a node attachmen...
Ogre::Camera::getRealUp
Vector3 getRealUp(void) const
Gets the real world up vector of the camera, including any rotation inherited from a node attachment.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Camera::ListenerList
vector< Listener * >::type ListenerList
Definition: OgreCamera.h:185
Ogre::Camera::setAutoTracking
void setAutoTracking(bool enabled, SceneNode *const target=0, const Vector3 &offset=Vector3::ZERO)
Enables / disables automatic tracking of a SceneNode.
Ogre::Camera::mAutoTrackTarget
SceneNode * mAutoTrackTarget
SceneNode which this Camera will automatically track.
Definition: OgreCamera.h:146
Ogre::Camera::mPosition
Vector3 mPosition
Camera position - default (0,0,0)
Definition: OgreCamera.h:118
Ogre::Camera::pitch
void pitch(const Radian &angle)
Pitches the camera up/down anticlockwise around it's local z axis.
Ogre::Camera::yaw
void yaw(const Radian &angle)
Rotates the camera anticlockwise around it's local y axis.
Ogre::Camera::getPosition
const Vector3 & getPosition(void) const
Retrieves the camera's position.
Ogre::Camera::getViewMatrix
const Matrix4 & getViewMatrix(bool ownFrustumOnly) const
Specialised version of getViewMatrix allowing caller to differentiate whether the custom culling frus...
Ogre::Camera::getBoundingRadius
Real getBoundingRadius(void) const
Overridden from MovableObject.
Ogre::Camera::Listener::cameraPostRenderScene
virtual void cameraPostRenderScene(Camera *cam)
Called after the scene has been rendered with this camera.
Definition: OgreCamera.h:102
Ogre::Camera::operator<<
_OgreExport friend std::ostream & operator<<(std::ostream &o, const Camera &c)
Function for outputting to a stream.
Ogre::SceneNode
Class representing a node in the scene graph.
Definition: OgreSceneNode.h:59
Ogre::Camera::setUseRenderingDistance
virtual void setUseRenderingDistance(bool use)
Set whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
Definition: OgreCamera.h:634
Ogre::Camera::Camera
Camera(const String &name, SceneManager *sm)
Standard constructor.
Ogre::Camera::roll
void roll(const Radian &angle)
Rolls the camera anticlockwise, around its local z axis.
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:58
Ogre::Camera::mSceneLodFactorInv
Real mSceneLodFactorInv
Inverted scene LOD factor, can be used by Renderables to adjust their LOD.
Definition: OgreCamera.h:153
Ogre::Camera::getUp
Vector3 getUp(void) const
Gets the camera's up vector.
Ogre::Camera::setFixedYawAxis
void setFixedYawAxis(bool useFixed, const Vector3 &fixedAxis=Vector3::UNIT_Y)
Tells the camera whether to yaw around it's own local Y axis or a fixed axis of choice.
Ogre::Camera::lookAt
void lookAt(Real x, Real y, Real z)
Points the camera at a location in worldspace.
Ogre::Camera::mDerivedOrientation
Quaternion mDerivedOrientation
Derived orientation/position of the camera, including reflection.
Definition: OgreCamera.h:121
OgreHeaderPrefix.h
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::Camera::getRealRight
Vector3 getRealRight(void) const
Gets the real world right vector of the camera, including any rotation inherited from a node attachme...
Ogre::Camera::mUseMinPixelSize
bool mUseMinPixelSize
Whether or not the minimum display size of objects should take effect for this camera.
Definition: OgreCamera.h:181
Ogre::Camera::rotate
void rotate(const Quaternion &q)
Rotate the camera around an arbitrary axis using a Quaternion.
Ogre::Camera::getDerivedRight
Vector3 getDerivedRight(void) const
Gets the derived right vector of the camera, including any rotation inherited from a node attachment ...
Ogre::SceneManager
Manages the organisation and rendering of a 'scene' i.e.
Definition: OgreSceneManager.h:144
Ogre::Camera::_getLodBiasInverse
Real _getLodBiasInverse(void) const
Internal method for OGRE to use for LOD calculations.
Ogre::Camera::isVisible
bool isVisible(const Vector3 &vert, FrustumPlane *culledBy=0) const
Tests whether the given vertex is visible in the Frustum.
Ogre::Viewport
An abstraction of a viewport, i.e.
Definition: OgreViewport.h:58
OgrePrerequisites.h
Ogre::Camera::getViewMatrix
const Matrix4 & getViewMatrix(void) const
Gets the view matrix for this frustum.
Ogre::Camera::moveRelative
void moveRelative(const Vector3 &vec)
Moves the camera's position by the vector offset provided along it's own axes (relative to orientatio...
Ogre::Camera::isVisible
bool isVisible(const AxisAlignedBox &bound, FrustumPlane *culledBy=0) const
Tests whether the given container is visible in the Frustum.
Ogre::Camera::mAutoTrackOffset
Vector3 mAutoTrackOffset
Tracking offset for fine tuning.
Definition: OgreCamera.h:148
Ogre::Camera::Listener::cameraDestroyed
virtual void cameraDestroyed(Camera *cam)
Called when the camera is being destroyed.
Definition: OgreCamera.h:106
Ogre::Radian
Wrapper class which indicates a given angle value is in Radians.
Definition: OgreMath.h:48
Ogre::Camera::mLodCamera
const Camera * mLodCamera
Camera to use for LOD calculation.
Definition: OgreCamera.h:178
Ogre::Camera::_notifyRenderedBatches
void _notifyRenderedBatches(unsigned int numbatches)
Internal method to notify camera of the visible batches in the last render.
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Camera::setDirection
void setDirection(const Vector3 &vec)
Sets the camera's direction vector.
OgreCommon.h
Ogre::Camera::setWindowImpl
virtual void setWindowImpl(void) const
Do actual window setting, using parameters set in SetWindow call.
Ogre::Camera::isVisible
bool isVisible(const Sphere &bound, FrustumPlane *culledBy=0) const
Tests whether the given container is visible in the Frustum.
Ogre::Camera::getViewport
Viewport * getViewport(void) const
Get the last viewport which was attached to this camera.
Definition: OgreCamera.h:563
Ogre::Camera::getWorldSpaceCorners
const Vector3 * getWorldSpaceCorners(void) const
Gets the world space corners of the frustum.
Ogre::Camera::_renderScene
void _renderScene(Viewport *vp, bool includeOverlays)
Tells the Camera to contact the SceneManager to render from it's viewpoint.
Ogre::Camera::mLastViewport
Viewport * mLastViewport
The last viewport to be added using this camera.
Definition: OgreCamera.h:168
Ogre::Camera::mWTop
Real mWTop
Definition: OgreCamera.h:160
Ogre::Camera::_getNumRenderedFaces
unsigned int _getNumRenderedFaces(void) const
Internal method to retrieve the number of visible faces in the last render.
Ogre::Camera::mYawFixed
bool mYawFixed
Whether to yaw around a fixed axis.
Definition: OgreCamera.h:129
Ogre::Sphere
A sphere primitive, mostly used for bounds checking.
Definition: OgreSphere.h:52
Ogre::Camera::getLodBias
Real getLodBias(void) const
Returns the level-of-detail bias factor currently applied to this camera.
Ogre::Frustum
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Definition: OgreFrustum.h:86
Ogre::Camera::mRealPosition
Vector3 mRealPosition
Definition: OgreCamera.h:126
Ogre::Camera::addListener
virtual void addListener(Listener *l)
Add a listener to this camera.
Ogre::FrustumPlane
FrustumPlane
Worldspace clipping planes.
Definition: OgreFrustum.h:72
OgreMovableObject.h
OgrePlane.h
Ogre::Camera::isViewOutOfDate
bool isViewOutOfDate(void) const
Ogre::Camera::getCameraToViewportRay
void getCameraToViewportRay(Real screenx, Real screeny, Ray *outRay) const
Gets a world space ray as cast from the camera through a viewport position.
Ogre::Camera::getCameraToViewportBoxVolume
PlaneBoundedVolume getCameraToViewportBoxVolume(Real screenLeft, Real screenTop, Real screenRight, Real screenBottom, bool includeFarPlane=false)
Gets a world-space list of planes enclosing a volume based on a viewport rectangle.
Ogre::Camera::getDerivedPosition
const Vector3 & getDerivedPosition(void) const
Gets the derived position of the camera, including any translation inherited from a node attachment a...
Ogre::Camera::mAutoAspectRatio
bool mAutoAspectRatio
Whether aspect ratio will automatically be recalculated when a viewport changes its size.
Definition: OgreCamera.h:172
Ogre::PlaneBoundedVolume
Represents a convex volume bounded by planes.
Definition: OgrePlaneBoundedVolume.h:50
Ogre::Camera::getRealPosition
const Vector3 & getRealPosition(void) const
Gets the real world position of the camera, including any translation inherited from a node attachmen...
Ogre::Camera::projectSphere
bool projectSphere(const Sphere &sphere, Real *left, Real *top, Real *right, Real *bottom) const
Project a sphere onto the near plane and get the bounding rectangle.
Ogre::Camera::getFrustumPlane
const Plane & getFrustumPlane(unsigned short plane) const
Retrieves a specified plane of the frustum (world space).
OgreMatrix4.h
Ogre::Camera::mDerivedPosition
Vector3 mDerivedPosition
Definition: OgreCamera.h:122
Ogre::Camera::getLodCamera
virtual const Camera * getLodCamera() const
Get a pointer to the camera which should be used to determine LOD settings.
Ogre::Camera::setUseMinPixelSize
void setUseMinPixelSize(bool enable)
Sets whether to use min display size calculations.
Definition: OgreCamera.h:657
Ogre::Camera::Listener
Listener interface so you can be notified of Camera events.
Definition: OgreCamera.h:92
Ogre::Camera::mPixelDisplayRatio
Real mPixelDisplayRatio
Definition: OgreCamera.h:183
Ogre::Camera::getRight
Vector3 getRight(void) const
Gets the camera's right vector.
Ogre::Camera::lookAt
void lookAt(const Vector3 &targetPoint)
Points the camera at a location in worldspace.
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Camera::setDirection
void setDirection(Real x, Real y, Real z)
Sets the camera's direction vector.
Ogre::Camera::~Camera
virtual ~Camera()
Standard destructor.
Ogre::Camera::getWorldTransforms
void getWorldTransforms(Matrix4 *mat) const
Overridden from Frustum/Renderable.
Ogre::Camera::mVisFacesLastRender
unsigned int mVisFacesLastRender
Stored number of visible faces in the last render.
Definition: OgreCamera.h:137
Ogre::Camera::setPolygonMode
void setPolygonMode(PolygonMode sd)
Sets the level of rendering detail required from this camera.
Ogre::Camera::Listener::~Listener
virtual ~Listener()
Definition: OgreCamera.h:95
Ogre::Camera::setWindow
virtual void setWindow(Real left, Real top, Real right, Real bottom)
Sets the viewing window inside of viewport.
Ogre::Camera::getPixelDisplayRatio
Real getPixelDisplayRatio() const
Returns an estimated ratio between a pixel and the display area it represents.
Definition: OgreCamera.h:673
Ogre::Camera::getWindowPlanes
const vector< Plane >::type & getWindowPlanes(void) const
Gets the window clip planes, only applicable if isWindowSet == true.
Ogre::Camera::getOrientation
const Quaternion & getOrientation(void) const
Returns the camera's current orientation.
Ogre::Camera::getMovableType
const String & getMovableType(void) const
Overridden from MovableObject.
Ogre::Camera::mCullFrustum
Frustum * mCullFrustum
Custom culling frustum.
Definition: OgreCamera.h:174
Ogre::Camera::getAutoAspectRatio
bool getAutoAspectRatio(void) const
Retrieves if AutoAspectRatio is currently set or not.
OgreString.h
Ogre::Camera::mOrientation
Quaternion mOrientation
Camera orientation, quaternion style.
Definition: OgreCamera.h:115
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::Camera::move
void move(const Vector3 &vec)
Moves the camera's position by the vector offset provided along world axes.
Ogre::Camera::getCullingFrustum
Frustum * getCullingFrustum(void) const
Returns the custom culling frustum in use.
Definition: OgreCamera.h:593
Ogre::Ray
Representation of a ray in space, i.e.
Definition: OgreRay.h:47
Ogre::Camera::getDirection
Vector3 getDirection(void) const
Gets the camera's direction.
OgreVector3.h
Ogre::Camera::setPosition
void setPosition(const Vector3 &vec)
Sets the camera's position.
Ogre::Camera::getCameraToViewportRay
Ray getCameraToViewportRay(Real screenx, Real screeny) const
Gets a world space ray as cast from the camera through a viewport position.
OgreFrustum.h
Ogre::Camera::getDerivedUp
Vector3 getDerivedUp(void) const
Gets the derived up vector of the camera, including any rotation inherited from a node attachment and...
Ogre::PolygonMode
PolygonMode
The polygon mode to use when rasterising.
Definition: OgreCommon.h:180
OgrePlaneBoundedVolume.h
Ogre::Camera::invalidateView
void invalidateView(void) const
Signal to update view information.
Ogre::Camera::msMovableType
static String msMovableType
Shared class-level name for Movable type.
Definition: OgreCamera.h:143
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::Camera::getPolygonMode
PolygonMode getPolygonMode(void) const
Retrieves the level of detail that the camera will render.
Ogre::Camera::mSceneMgr
SceneManager * mSceneMgr
Scene manager responsible for the scene.
Definition: OgreCamera.h:112
Ogre::Camera::synchroniseBaseSettingsWith
virtual void synchroniseBaseSettingsWith(const Camera *cam)
Synchronise core camera settings with another.
Ogre::Camera::getPositionForViewUpdate
const Vector3 & getPositionForViewUpdate(void) const
Get the derived position of this frustum.
Ogre::Camera::isWindowSet
virtual bool isWindowSet(void) const
Returns if a viewport window is being used.
Definition: OgreCamera.h:547
Ogre::Camera::getDerivedOrientation
const Quaternion & getDerivedOrientation(void) const
Gets the derived orientation of the camera, including any rotation inherited from a node attachment a...
Ogre::Camera::getNearClipDistance
Real getNearClipDistance(void) const
Sets the position of the near clipping plane.

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.