Go to the documentation of this file.
509 Real screenTop,
Real screenRight,
Real screenBottom,
bool includeFarPlane =
false);
683 #endif // __Camera_H__
static const Vector3 UNIT_Y
unsigned int _getNumRenderedBatches(void) const
Internal method to retrieve the number of visible batches in the last render.
void setLodBias(Real factor=1.0)
Sets the level-of-detail factor for this Camera.
virtual void cameraPreRenderScene(Camera *cam)
Called prior to the scene being rendered with this camera.
PolygonMode mSceneDetail
Rendering type.
bool getUseMinPixelSize() const
Returns whether to use min display size calculations.
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.
SceneNode * getAutoTrackTarget(void) const
Get the auto tracking target for this camera, if any.
static const Vector3 ZERO
Real mSceneLodFactor
Scene LOD factor used to adjust overall LOD.
Defines a plane in 3D space.
SceneManager * getSceneManager(void) const
Returns a pointer to the SceneManager this camera is rendering through.
void _autoTrack(void)
Internal method used by OGRE to update auto-tracking cameras.
Quaternion mRealOrientation
Real world orientation/position of the camera.
virtual void removeListener(Listener *l)
Remove a listener to this camera.
void setPosition(Real x, Real y, Real z)
Sets the camera's position.
void _notifyRenderedFaces(unsigned int numfaces)
Internal method to notify camera of the visible faces in the last render.
const Quaternion & getOrientationForViewUpdate(void) const
Get the derived orientation of this frustum.
void setAutoAspectRatio(bool autoratio)
If set to true a viewport that owns this frustum will be able to recalculate the aspect ratio wheneve...
A viewpoint from which the scene will be rendered.
virtual vector< Vector4 >::type getRayForwardIntersect(const Vector3 &anchor, const Vector3 *dir, Real planeOffset) const
Helper function for forwardIntersect that intersects rays with canonical plane.
virtual void forwardIntersect(const Plane &worldPlane, vector< Vector4 >::type *intersect3d) const
Forward projects frustum rays to find forward intersection with plane.
void _notifyViewport(Viewport *viewport)
Notifies this camera that a viewport is using it.
Vector3 getDerivedDirection(void) const
Gets the derived direction vector of the camera, including any rotation inherited from a node attachm...
const Vector3 & getAutoTrackOffset(void) const
Get the auto tracking offset for this camera, if it is auto tracking.
void rotate(const Vector3 &axis, const Radian &angle)
Rotate the camera around an arbitrary axis.
void setCullingFrustum(Frustum *frustum)
Tells the camera to use a separate Frustum instance to perform culling.
virtual void setLodCamera(const Camera *lodCam)
Set a pointer to the camera which should be used to determine LOD settings.
virtual void resetWindow(void)
Cancel view window.
bool mUseRenderingDistance
Whether or not the rendering distance of objects should take effect for this camera.
Real getFarClipDistance(void) const
Retrieves the distance from the frustum to the far clipping plane.
unsigned int mVisBatchesLastRender
Stored number of visible batches in the last render.
bool mRecalcWindow
Was viewing window changed.
Vector3 mYawFixedAxis
Fixed axis to yaw around.
virtual bool getUseRenderingDistance(void) const
Get whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
bool mWindowSet
Is viewing window used.
void setOrientation(const Quaternion &q)
Sets the camera's orientation.
Vector3 getRealDirection(void) const
Gets the real world direction vector of the camera, including any rotation inherited from a node atta...
vector< Plane >::type mWindowClipPlanes
Windowed viewport clip planes.
void invalidateFrustum(void) const
Signal to update frustum information.
const Quaternion & getRealOrientation(void) const
Gets the real world orientation of the camera, including any rotation inherited from a node attachmen...
Vector3 getRealUp(void) const
Gets the real world up vector of the camera, including any rotation inherited from a node attachment.
vector< Listener * >::type ListenerList
void setAutoTracking(bool enabled, SceneNode *const target=0, const Vector3 &offset=Vector3::ZERO)
Enables / disables automatic tracking of a SceneNode.
SceneNode * mAutoTrackTarget
SceneNode which this Camera will automatically track.
Vector3 mPosition
Camera position - default (0,0,0)
void pitch(const Radian &angle)
Pitches the camera up/down anticlockwise around it's local z axis.
void yaw(const Radian &angle)
Rotates the camera anticlockwise around it's local y axis.
const Vector3 & getPosition(void) const
Retrieves the camera's position.
const Matrix4 & getViewMatrix(bool ownFrustumOnly) const
Specialised version of getViewMatrix allowing caller to differentiate whether the custom culling frus...
Real getBoundingRadius(void) const
Overridden from MovableObject.
virtual void cameraPostRenderScene(Camera *cam)
Called after the scene has been rendered with this camera.
_OgreExport friend std::ostream & operator<<(std::ostream &o, const Camera &c)
Function for outputting to a stream.
Class representing a node in the scene graph.
virtual void setUseRenderingDistance(bool use)
Set whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
Camera(const String &name, SceneManager *sm)
Standard constructor.
void roll(const Radian &angle)
Rolls the camera anticlockwise, around its local z axis.
Implementation of a Quaternion, i.e.
Real mSceneLodFactorInv
Inverted scene LOD factor, can be used by Renderables to adjust their LOD.
Vector3 getUp(void) const
Gets the camera's up vector.
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.
void lookAt(Real x, Real y, Real z)
Points the camera at a location in worldspace.
Quaternion mDerivedOrientation
Derived orientation/position of the camera, including reflection.
Class encapsulating a standard 4x4 homogeneous matrix.
Vector3 getRealRight(void) const
Gets the real world right vector of the camera, including any rotation inherited from a node attachme...
bool mUseMinPixelSize
Whether or not the minimum display size of objects should take effect for this camera.
void rotate(const Quaternion &q)
Rotate the camera around an arbitrary axis using a Quaternion.
Vector3 getDerivedRight(void) const
Gets the derived right vector of the camera, including any rotation inherited from a node attachment ...
Manages the organisation and rendering of a 'scene' i.e.
Real _getLodBiasInverse(void) const
Internal method for OGRE to use for LOD calculations.
bool isVisible(const Vector3 &vert, FrustumPlane *culledBy=0) const
Tests whether the given vertex is visible in the Frustum.
An abstraction of a viewport, i.e.
const Matrix4 & getViewMatrix(void) const
Gets the view matrix for this frustum.
void moveRelative(const Vector3 &vec)
Moves the camera's position by the vector offset provided along it's own axes (relative to orientatio...
bool isVisible(const AxisAlignedBox &bound, FrustumPlane *culledBy=0) const
Tests whether the given container is visible in the Frustum.
Vector3 mAutoTrackOffset
Tracking offset for fine tuning.
virtual void cameraDestroyed(Camera *cam)
Called when the camera is being destroyed.
Wrapper class which indicates a given angle value is in Radians.
const Camera * mLodCamera
Camera to use for LOD calculation.
void _notifyRenderedBatches(unsigned int numbatches)
Internal method to notify camera of the visible batches in the last render.
A 3D box aligned with the x/y/z axes.
void setDirection(const Vector3 &vec)
Sets the camera's direction vector.
virtual void setWindowImpl(void) const
Do actual window setting, using parameters set in SetWindow call.
bool isVisible(const Sphere &bound, FrustumPlane *culledBy=0) const
Tests whether the given container is visible in the Frustum.
Viewport * getViewport(void) const
Get the last viewport which was attached to this camera.
const Vector3 * getWorldSpaceCorners(void) const
Gets the world space corners of the frustum.
void _renderScene(Viewport *vp, bool includeOverlays)
Tells the Camera to contact the SceneManager to render from it's viewpoint.
Viewport * mLastViewport
The last viewport to be added using this camera.
unsigned int _getNumRenderedFaces(void) const
Internal method to retrieve the number of visible faces in the last render.
bool mYawFixed
Whether to yaw around a fixed axis.
A sphere primitive, mostly used for bounds checking.
Real getLodBias(void) const
Returns the level-of-detail bias factor currently applied to this camera.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
virtual void addListener(Listener *l)
Add a listener to this camera.
FrustumPlane
Worldspace clipping planes.
bool isViewOutOfDate(void) const
void getCameraToViewportRay(Real screenx, Real screeny, Ray *outRay) const
Gets a world space ray as cast from the camera through a viewport position.
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.
const Vector3 & getDerivedPosition(void) const
Gets the derived position of the camera, including any translation inherited from a node attachment a...
bool mAutoAspectRatio
Whether aspect ratio will automatically be recalculated when a viewport changes its size.
Represents a convex volume bounded by planes.
const Vector3 & getRealPosition(void) const
Gets the real world position of the camera, including any translation inherited from a node attachmen...
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.
const Plane & getFrustumPlane(unsigned short plane) const
Retrieves a specified plane of the frustum (world space).
virtual const Camera * getLodCamera() const
Get a pointer to the camera which should be used to determine LOD settings.
void setUseMinPixelSize(bool enable)
Sets whether to use min display size calculations.
Listener interface so you can be notified of Camera events.
Vector3 getRight(void) const
Gets the camera's right vector.
void lookAt(const Vector3 &targetPoint)
Points the camera at a location in worldspace.
float Real
Software floating point type.
void setDirection(Real x, Real y, Real z)
Sets the camera's direction vector.
virtual ~Camera()
Standard destructor.
void getWorldTransforms(Matrix4 *mat) const
Overridden from Frustum/Renderable.
unsigned int mVisFacesLastRender
Stored number of visible faces in the last render.
void setPolygonMode(PolygonMode sd)
Sets the level of rendering detail required from this camera.
virtual void setWindow(Real left, Real top, Real right, Real bottom)
Sets the viewing window inside of viewport.
Real getPixelDisplayRatio() const
Returns an estimated ratio between a pixel and the display area it represents.
const vector< Plane >::type & getWindowPlanes(void) const
Gets the window clip planes, only applicable if isWindowSet == true.
const Quaternion & getOrientation(void) const
Returns the camera's current orientation.
const String & getMovableType(void) const
Overridden from MovableObject.
Frustum * mCullFrustum
Custom culling frustum.
bool getAutoAspectRatio(void) const
Retrieves if AutoAspectRatio is currently set or not.
Quaternion mOrientation
Camera orientation, quaternion style.
void move(const Vector3 &vec)
Moves the camera's position by the vector offset provided along world axes.
Frustum * getCullingFrustum(void) const
Returns the custom culling frustum in use.
Representation of a ray in space, i.e.
Vector3 getDirection(void) const
Gets the camera's direction.
void setPosition(const Vector3 &vec)
Sets the camera's position.
Ray getCameraToViewportRay(Real screenx, Real screeny) const
Gets a world space ray as cast from the camera through a viewport position.
Vector3 getDerivedUp(void) const
Gets the derived up vector of the camera, including any rotation inherited from a node attachment and...
PolygonMode
The polygon mode to use when rasterising.
void invalidateView(void) const
Signal to update view information.
static String msMovableType
Shared class-level name for Movable type.
Standard 3-dimensional vector.
PolygonMode getPolygonMode(void) const
Retrieves the level of detail that the camera will render.
SceneManager * mSceneMgr
Scene manager responsible for the scene.
virtual void synchroniseBaseSettingsWith(const Camera *cam)
Synchronise core camera settings with another.
const Vector3 & getPositionForViewUpdate(void) const
Get the derived position of this frustum.
virtual bool isWindowSet(void) const
Returns if a viewport window is being used.
const Quaternion & getDerivedOrientation(void) const
Gets the derived orientation of the camera, including any rotation inherited from a node attachment a...
Real getNearClipDistance(void) const
Sets the position of the near clipping plane.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.