Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::Camera Class Reference

A viewpoint from which the scene will be rendered. More...

#include <OgreCamera.h>

Inheritance diagram for Ogre::Camera:

Ogre::MovableObject Ogre::OctreeCamera List of all members.

Public Methods

 Camera (String name, SceneManager *sm)
 Standard constructor. More...

virtual ~Camera ()
 Standard destructor. More...

SceneManagergetSceneManager (void) const
 Returns a pointer to the SceneManager this camera is rendering through. More...

virtual const StringgetName (void) const
 Gets the camera's name. More...

void setProjectionType (ProjectionType pt)
 Sets the type of projection to use (orthographic or perspective). More...

ProjectionType getProjectionType (void) const
 Retrieves info on the type of projection used (orthographic or perspective). More...

void setDetailLevel (SceneDetailLevel sd)
 Sets the level of rendering detail required from this camera. More...

SceneDetailLevel getDetailLevel (void) const
 Retrieves the level of detail that the camera will render. More...

void setPosition (Real x, Real y, Real z)
 Sets the camera's position. More...

void setPosition (const Vector3 &vec)
 Sets the camera's position. More...

const Vector3getPosition (void) const
 Retrieves the camera's position. More...

void move (const Vector3 &vec)
 Moves the camera's position by the vector offset provided along world axes. More...

void moveRelative (const Vector3 &vec)
 Moves the camera's position by the vector offset provided along it's own axes (relative to orientation). More...

void setDirection (Real x, Real y, Real z)
 Sets the camera's direction vector. More...

void setDirection (const Vector3 &vec)
 Sets the camera's direction vector. More...

Vector3 getDirection (void) const
void lookAt (const Vector3 &targetPoint)
 Points the camera at a location in worldspace. More...

void lookAt (Real x, Real y, Real z)
 Points the camera at a location in worldspace. More...

void roll (Real degrees)
 Rolls the camera anticlockwise, in degrees, around its local z axis. More...

void yaw (Real degrees)
 Rotates the camera anticlockwise around it's local y axis. More...

void pitch (Real degrees)
 Pitches the camera up/down anticlockwise around it's local z axis. More...

void rotate (const Vector3 &axis, Real degrees)
 Rotate the camera around an arbitrary axis. More...

void rotate (const Quaternion &q)
 Rotate the camera around an aritrary axis using a Quarternion. More...

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. More...

void setFOVy (Real fovy)
 Sets the Y-dimension Field Of View (FOV) of the camera. More...

Real getFOVy (void) const
 Retrieves the cameras Y-dimension Field Of View (FOV). More...

void setNearClipDistance (Real nearDist)
 Sets the position of the near clipping plane. More...

Real getNearClipDistance (void) const
 Sets the position of the near clipping plane. More...

void setFarClipDistance (Real farDist)
 Sets the distance to the far clipping plane. More...

Real getFarClipDistance (void) const
 Retrieves the distance from the camera to the far clipping plane. More...

void setAspectRatio (Real ratio)
 Sets the aspect ratio for the camera viewport. More...

Real getAspectRatio (void) const
 Retreives the current aspect ratio. More...

const Matrix4getProjectionMatrix (void)
 Gets the projection matrix for this camera. More...

const Matrix4getViewMatrix (void)
 Gets the view matrix for this camera. More...

const PlanegetFrustumPlane (FrustumPlane plane)
 Retrieves a specified plane of the frustum. More...

bool isVisible (const AxisAlignedBox &bound, FrustumPlane *culledBy=0)
 Tests whether the given container is visible in the Frustum. More...

bool isVisible (const Sphere &bound, FrustumPlane *culledBy=0)
 Tests whether the given container is visible in the Frustum. More...

bool isVisible (const Vector3 &vert, FrustumPlane *culledBy=0)
 Tests whether the given vertex is visible in the Frustum. More...

const QuaterniongetOrientation (void) const
 Returns the camera's current orientation. More...

void setOrientation (const Quaternion &q)
 Sets the camera's orientation. More...

void _renderScene (Viewport *vp, bool includeOverlays)
 Tells the Camera to contact the SceneManager to render from it's viewpoint. More...

void _notifyRenderedFaces (unsigned int numfaces)
 Internal method to notify camera of the visible faces in the last render. More...

unsigned int _getNumRenderedFaces (void) const
 Internal method to retrieve the number of visible faces in the last render. More...

Quaternion getDerivedOrientation (void) const
 Gets the derived orientation of the camera, including any rotation inherited from a node attachment. More...

Vector3 getDerivedPosition (void) const
 Gets the derived position of the camera, including any translation inherited from a node attachment. More...

Vector3 getDerivedDirection (void) const
 Gets the derived direction vector of the camera, including any translation inherited from a node attachment. More...

void _notifyCurrentCamera (Camera *cam)
 Overridden from MovableObject. More...

const AxisAlignedBoxgetBoundingBox (void) const
 Overridden from MovableObject. More...

void _updateRenderQueue (RenderQueue *queue)
 Overridden from MovableObject. More...

const String getMovableType (void) const
 Overridden from MovableObject. More...

void setAutoTracking (bool enabled, SceneNode *target=0, const Vector3 &offset=Vector3::ZERO)
 Enables / disables automatic tracking of a SceneNode. More...

void setLodBias (Real factor=1.0)
 Sets the level-of-detail factor for this Camera. More...

Real getLodBias (void)
 Returns the level-of-detail bias factor currently applied to this camera. More...

Real _getLodBiasInverse (void)
 Internal method for OGRE to use for LOD calculations. More...

void _autoTrack (void)
 Internal method used by OGRE to update auto-tracking cameras. More...

virtual SceneNodegetParentNode (void)
 Returns the node to which this object is attached. More...

virtual void _notifyAttached (SceneNode *parent)
 Internal method called to notify the object that it has been attached to a node. More...

virtual bool isAttached (void) const
 Returns true if this object is attached to a SceneNode. More...

virtual void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...

virtual bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not. More...

virtual void setUserObject (UserDefinedObject *obj)
 Call this to associate your own custom user object instance with this MovableObject. More...

virtual UserDefinedObjectgetUserObject (void)
 Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject. More...

virtual void setRenderQueueGroup (RenderQueueGroupID queueID)
 Sets the render queue group this entity will be rendered through. More...

virtual RenderQueueGroupID getRenderQueueGroup (void)
 Gets the queue group for this entity, see setRenderQueueGroup for full details. More...


Protected Methods

void updateFrustum (void) const
void updateView (void) const
bool isViewOutOfDate (void) const
bool isFrustumOutOfDate (void) const

Protected Attributes

String mName
 Camera name. More...

SceneManagermSceneMgr
 Scene manager responsible for the scene. More...

Quaternion mOrientation
 Camera orientation, quaternion style. More...

Vector3 mPosition
 Camera position - default (0,0,0). More...

Quaternion mLastParentOrientation
 Stored versions of parent orientation / position. More...

Vector3 mLastParentPosition
Quaternion mDerivedOrientation
 Derived positions of parent orientation / position. More...

Vector3 mDerivedPosition
Real mFOVy
 Camera y-direction field-of-view (default 45). More...

Real mFarDist
 Far clip distance - default 10000. More...

Real mNearDist
 Near clip distance - default 100. More...

Real mAspect
 x/y viewport ratio - default 1.3333. More...

bool mYawFixed
 Whether to yaw around a fixed axis. More...

Vector3 mYawFixedAxis
 Fixed axis to yaw around. More...

Plane mFrustumPlanes [6]
 The 6 main clipping planes. More...

ProjectionType mProjType
 Orthographic or perspective? More...

SceneDetailLevel mSceneDetail
 Rendering type. More...

Matrix4 mProjMatrix
 Pre-calced projection matrix. More...

Matrix4 mViewMatrix
 Pre-calced view matrix. More...

bool mRecalcFrustum
 Something's changed in the frustrum shape? More...

bool mRecalcView
 Something re the view pos has changed. More...

Real mCoeffL [2]
 Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes. More...

Real mCoeffR [2]
 Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes. More...

Real mCoeffB [2]
 Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes. More...

Real mCoeffT [2]
 Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes. More...

unsigned int mVisFacesLastRender
 Stored number of visible faces in the last render. More...

SceneNodemAutoTrackTarget
 SceneNode which this Camera will automatically track. More...

Vector3 mAutoTrackOffset
 Tracking offset for fine tuning. More...

Real mSceneLodFactor
Real mSceneLodFactorInv
 Inverted scene LOD factor, can be used by Renderables to adjust their LOD. More...

SceneNodemParentNode
 node to which this object is attached. More...

bool mVisible
 Is this object visible? More...

UserDefinedObjectmUserObject
 User defined object which is linked to this object. More...

RenderQueueGroupID mRenderQueueID
 The render queue to use when rendering this object. More...


Static Protected Attributes

String msMovableType = "Camera"
 Shared class-level name for Movable type. More...


Friends

std::ostream & operator<< (std::ostream &o, Camera &c)
 Function for outputting to a stream. More...


Detailed Description

A viewpoint from which the scene will be rendered.

Remarks:
OGRE renders scenes from a camera viewpoint into a buffer of some sort, normally a window or a texture (a subclass of RenderTarget). OGRE cameras support both perspective projection (the default, meaning objects get smaller the further away they are) and orthographic projection (blueprint-style, no decrease in size with distance). Each camera carries with it a style of rendering, e.g. full textured, flat shaded, wireframe), field of view, rendering distances etc, allowing you to use OGRE to create complex multi-window views if required. In addition, more than one camera can point at a single render target if required, each rendering to a subset of the target, allowing split screen and picture-in-picture views.

Cameras maintain their own aspect ratios, field of view, and frustrum, and project co-ordinates into a space measured from -1 to 1 in x and y, and 0 to 1 in z. At render time, the camera will be rendering to a Viewport which will translate these parametric co-ordinates into real screen co-ordinates. Obviously it is advisable that the viewport has the same aspect ratio as the camera to avoid distortion (unless you want it!).

Note that a Camera can be attached to a SceneNode, using the method SceneNode::attachObject. If this is done the Camera will combine it's own position/orientation settings with it's parent SceneNode. This is useful for implementing more complex Camera / object relationships i.e. having a camera attached to a world object.


Constructor & Destructor Documentation

Ogre::Camera::Camera String    name,
SceneManager   sm
 

Standard constructor.

Ogre::Camera::~Camera   [virtual]
 

Standard destructor.


Member Function Documentation

void Ogre::Camera::_autoTrack void   
 

Internal method used by OGRE to update auto-tracking cameras.

Real Ogre::Camera::_getLodBiasInverse void   
 

Internal method for OGRE to use for LOD calculations.

unsigned int Ogre::Camera::_getNumRenderedFaces void    const
 

Internal method to retrieve the number of visible faces in the last render.

void Ogre::MovableObject::_notifyAttached SceneNode   parent [virtual, inherited]
 

Internal method called to notify the object that it has been attached to a node.

Reimplemented in Ogre::SimpleRenderable.

void Ogre::Camera::_notifyCurrentCamera Camera *    cam [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

void Ogre::Camera::_notifyRenderedFaces unsigned int    numfaces
 

Internal method to notify camera of the visible faces in the last render.

void Ogre::Camera::_renderScene Viewport   vp,
bool    includeOverlays
 

Tells the Camera to contact the SceneManager to render from it's viewpoint.

Parameters:
vp  The viewport to render to
includeOverlays  Whether or not any overlay objects should be included

void Ogre::Camera::_updateRenderQueue RenderQueue   queue [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Real Ogre::Camera::getAspectRatio void    const
 

Retreives the current aspect ratio.

const AxisAlignedBox & Ogre::Camera::getBoundingBox void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

Vector3 Ogre::Camera::getDerivedDirection void    const
 

Gets the derived direction vector of the camera, including any translation inherited from a node attachment.

Quaternion Ogre::Camera::getDerivedOrientation void    const
 

Gets the derived orientation of the camera, including any rotation inherited from a node attachment.

Vector3 Ogre::Camera::getDerivedPosition void    const
 

Gets the derived position of the camera, including any translation inherited from a node attachment.

SceneDetailLevel Ogre::Camera::getDetailLevel void    const
 

Retrieves the level of detail that the camera will render.

Vector3 Ogre::Camera::getDirection void    const
 

Real Ogre::Camera::getFarClipDistance void    const
 

Retrieves the distance from the camera to the far clipping plane.

Real Ogre::Camera::getFOVy void    const
 

Retrieves the cameras Y-dimension Field Of View (FOV).

const Plane & Ogre::Camera::getFrustumPlane FrustumPlane    plane
 

Retrieves a specified plane of the frustum.

Remarks:
Gets a reference to one of the planes which make up the camera frustum, e.g. for clipping purposes.

Real Ogre::Camera::getLodBias void   
 

Returns the level-of-detail bias factor currently applied to this camera.

Remarks:
See Camera::setLodBias for more details.

const String Ogre::Camera::getMovableType void    const [virtual]
 

Overridden from MovableObject.

Implements Ogre::MovableObject.

const String & Ogre::Camera::getName void    const [virtual]
 

Gets the camera's name.

Implements Ogre::MovableObject.

Real Ogre::Camera::getNearClipDistance void    const
 

Sets the position of the near clipping plane.

const Quaternion & Ogre::Camera::getOrientation void    const
 

Returns the camera's current orientation.

SceneNode * Ogre::MovableObject::getParentNode void    [virtual, inherited]
 

Returns the node to which this object is attached.

Remarks:
An object is not visible in the scene unless attached to a SceneNode.

Attaching an object is done via the SceneNode::attachObject method.

Reimplemented in Ogre::SimpleRenderable.

const Vector3 & Ogre::Camera::getPosition void    const
 

Retrieves the camera's position.

const Matrix4 & Ogre::Camera::getProjectionMatrix void   
 

Gets the projection matrix for this camera.

Mainly for use by OGRE internally.

ProjectionType Ogre::Camera::getProjectionType void    const
 

Retrieves info on the type of projection used (orthographic or perspective).

RenderQueueGroupID Ogre::MovableObject::getRenderQueueGroup void    [virtual, inherited]
 

Gets the queue group for this entity, see setRenderQueueGroup for full details.

SceneManager * Ogre::Camera::getSceneManager void    const
 

Returns a pointer to the SceneManager this camera is rendering through.

virtual UserDefinedObject* Ogre::MovableObject::getUserObject void    [inline, virtual, inherited]
 

Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.

const Matrix4 & Ogre::Camera::getViewMatrix void   
 

Gets the view matrix for this camera.

Mainly for use by OGRE internally.

bool Ogre::MovableObject::isAttached void    const [virtual, inherited]
 

Returns true if this object is attached to a SceneNode.

bool Ogre::Camera::isFrustumOutOfDate void    const [protected]
 

bool Ogre::Camera::isViewOutOfDate void    const [protected]
 

bool Ogre::MovableObject::isVisible void    const [virtual, inherited]
 

Returns whether or not this object is supposed to be visible or not.

bool Ogre::Camera::isVisible const Vector3   vert,
FrustumPlane   culledBy = 0
 

Tests whether the given vertex is visible in the Frustum.

Parameters:
vert  Vertex to be checked
culledBy  Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the box was visible, true is returned.

Otherwise, false is returned.

bool Ogre::Camera::isVisible const Sphere   bound,
FrustumPlane   culledBy = 0
 

Tests whether the given container is visible in the Frustum.

Parameters:
bound  Bounding sphere to be checked
culledBy  Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the sphere was visible, true is returned.

Otherwise, false is returned.

bool Ogre::Camera::isVisible const AxisAlignedBox   bound,
FrustumPlane   culledBy = 0
 

Tests whether the given container is visible in the Frustum.

Parameters:
bound  Bounding box to be checked
culledBy  Optional pointer to an int which will be filled by the plane number which culled the box if the result was false;
Returns:
If the box was visible, true is returned.

Otherwise, false is returned.

void Ogre::Camera::lookAt Real    x,
Real    y,
Real    z
 

Points the camera at a location in worldspace.

Remarks:
This is a helper method to automatically generate the direction vector for the camera, based on it's current position and the supplied look-at point.
Parameters:
x 
y 
z  Co-ordinates of the point to look at.

void Ogre::Camera::lookAt const Vector3   targetPoint
 

Points the camera at a location in worldspace.

Remarks:
This is a helper method to automatically generate the direction vector for the camera, based on it's current position and the supplied look-at point.
Parameters:
targetPoint  A vector specifying the look at point.

void Ogre::Camera::move const Vector3   vec
 

Moves the camera's position by the vector offset provided along world axes.

void Ogre::Camera::moveRelative const Vector3   vec
 

Moves the camera's position by the vector offset provided along it's own axes (relative to orientation).

void Ogre::Camera::pitch Real    degrees
 

Pitches the camera up/down anticlockwise around it's local z axis.

void Ogre::Camera::roll Real    degrees
 

Rolls the camera anticlockwise, in degrees, around its local z axis.

void Ogre::Camera::rotate const Quaternion   q
 

Rotate the camera around an aritrary axis using a Quarternion.

void Ogre::Camera::rotate const Vector3   axis,
Real    degrees
 

Rotate the camera around an arbitrary axis.

void Ogre::Camera::setAspectRatio Real    ratio
 

Sets the aspect ratio for the camera viewport.

Remarks:
The ratio between the x and y dimensions of the rectangular area visible through the camera is known as aspect ratio: aspect = width / height .

The default for most fullscreen windows is 1.3333 - this is also assumed by Ogre unless you use this method to state otherwise.

void Ogre::Camera::setAutoTracking bool    enabled,
SceneNode   target = 0,
const Vector3   offset = Vector3::ZERO
 

Enables / disables automatic tracking of a SceneNode.

Remarks:
If you enable auto-tracking, this Camera will automatically rotate to look at the target SceneNode every frame, no matter how it or SceneNode move. This is handy if you want a Camera to be focused on a single object or group of objects. Note that by default the Camera looks at the origin of the SceneNode, if you want to tweak this, e.g. if the object which is attached to this target node is quite big and you want to point the camera at a specific point on it, provide a vector in the 'offset' parameter and the camera's target point will be adjusted.
Parameters:
enabled  If true, the Camera will track the SceneNode supplied as the next parameter (cannot be null). If false the camera will cease tracking and will remain in it's current orientation.
target  Pointer to the SceneNode which this Camera will track. Make sure you don't delete this SceneNode before turning off tracking (e.g. SceneManager::clearScene will delete it so be careful of this). Can be null if and only if the enabled param is false.
offset  If supplied, the camera targets this point in local space of the target node instead of the origin of the target node. Good for fine tuning the look at point.

void Ogre::Camera::setDetailLevel SceneDetailLevel    sd
 

Sets the level of rendering detail required from this camera.

Remarks:
Each camera is set to render at full detail by default, that is with full texturing, lighting etc. This method lets you change that behaviour, allowing you to make the camera just render a wireframe view, for example.

void Ogre::Camera::setDirection const Vector3   vec
 

Sets the camera's direction vector.

void Ogre::Camera::setDirection Real    x,
Real    y,
Real    z
 

Sets the camera's direction vector.

Remarks:
Note that the 'up' vector for the camera will automatically be recalculated based on the current 'up' vector (i.e. the roll will remain the same).

void Ogre::Camera::setFarClipDistance Real    farDist
 

Sets the distance to the far clipping plane.

Remarks:
The view frustrum is a pyramid created from the camera position and the edges of the viewport. This frustrum does not extend to infinity - it is cropped near to the camera and there is a far plane beyond which nothing is displayed. This method sets the distance for the far plane. Different applications need different values: e.g. a flight sim needs a much further far clipping plane than a first-person shooter. An important point here is that the larger the gap between near and far clipping planes, the lower the accuracy of the Z-buffer used to depth-cue pixels. This is because the Z-range is limited to the size of the Z buffer (16 or 32-bit) and the max values must be spread over the gap between near and far clip planes. The bigger the range, the more the Z values will be approximated which can cause artifacts when lots of objects are close together in the Z-plane. So make sure you clip as close to the camera as you can - don't set a huge value for the sake of it.
Parameters:
far  The distance to the far clipping plane from the camera in world coordinates.

void Ogre::Camera::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.

Remarks:
This method allows you to change the yaw behaviour of the camera - by default, the camera yaws around it's own local Y axis. This is often what you want - for example a flying camera
  • but sometimes this produces unwanted effects. For example, if you're making a first-person shooter, you really don't want the yaw axis to reflect the local camera Y, because this would mean a different yaw axis if the player is looking upwards rather than when they are looking straight ahead. You can change this behaviour by setting the yaw to a fixed axis (say, the world Y).
Parameters:
useFixed  If true, the axis passed in the second parameter will always be the yaw axis no matter what the camera orientation. If false, the camera returns to it's default behaviour.
fixedAxis  The axis to use if the first parameter is true.

void Ogre::Camera::setFOVy Real    fovy
 

Sets the Y-dimension Field Of View (FOV) of the camera.

Remarks:
Field Of View (FOV) is the angle made between the camera's position, and the left & right edges of the 'screen' onto which the scene is projected. High values (90+) result in a wide-angle, fish-eye kind of view, low values (30-) in a stretched, telescopic kind of view. Typical values are between 45 and 60.

This value represents the HORIZONTAL field-of-view. The vertical field of view is calculated from this depending on the dimensions of the viewport (they will only be the same if the viewport is square).

Note:
Setting the FOV overrides the value supplied for Camera::setNearClipPlane.

void Ogre::Camera::setLodBias Real    factor = 1.0
 

Sets the level-of-detail factor for this Camera.

Remarks:
This method can be used to influence the overall level of detail of the scenes rendered using this camera. Various elements of the scene have level-of-detail reductions to improve rendering speed at distance; this method allows you to hint to those elements that you would like to adjust the level of detail that they would normally use (up or down).

The most common use for this method is to reduce the overall level of detail used for a secondary camera used for sub viewports like rear-view mirrors etc. Note that scene elements are at liberty to ignore this setting if they choose, this is merely a hint.

Parameters:
factor  The factor to apply to the usual level of detail calculation. Higher values increase the detail, so 2.0 doubles the normal detail and 0.5 halves it.

void Ogre::Camera::setNearClipDistance Real    nearDist
 

Sets the position of the near clipping plane.

Remarks:
The position of the near clipping plane is the distance from the cameras position to the screen on which the world is projected. The near plane distance, combined with the field-of-view and the aspect ratio, determines the size of the viewport through which the world is viewed (in world co-ordinates). Note that this world viewport is different to a screen viewport, which has it's dimensions expressed in pixels. The cameras viewport should have the same aspect ratio as the screen viewport it renders into to avoid distortion.
Parameters:
near  The distance to the near clipping plane from the camera in world coordinates.

void Ogre::Camera::setOrientation const Quaternion   q
 

Sets the camera's orientation.

void Ogre::Camera::setPosition const Vector3   vec
 

Sets the camera's position.

void Ogre::Camera::setPosition Real    x,
Real    y,
Real    z
 

Sets the camera's position.

void Ogre::Camera::setProjectionType ProjectionType    pt
 

Sets the type of projection to use (orthographic or perspective).

Default is perspective.

void Ogre::MovableObject::setRenderQueueGroup RenderQueueGroupID    queueID [virtual, inherited]
 

Sets the render queue group this entity will be rendered through.

Remarks:
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to RENDER_QUEUE_MAIN which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.

See RenderQueue for more details.

Parameters:
queueID  Enumerated value of the queue group to use.

virtual void Ogre::MovableObject::setUserObject UserDefinedObject   obj [inline, virtual, inherited]
 

Call this to associate your own custom user object instance with this MovableObject.

Remarks:
By simply making your game / application object a subclass of UserDefinedObject, you can establish a link between an OGRE instance of MovableObject and your own application classes. Call this method to establish the link.

void Ogre::MovableObject::setVisible bool    visible [virtual, inherited]
 

Tells this object whether to be visible or not, if it has a renderable component.

Reimplemented in Ogre::Light.

void Ogre::Camera::updateFrustum void    const [protected]
 

void Ogre::Camera::updateView void    const [protected]
 

void Ogre::Camera::yaw Real    degrees
 

Rotates the camera anticlockwise around it's local y axis.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &    o,
Camera &    c
[friend]
 

Function for outputting to a stream.


Member Data Documentation

Real Ogre::Camera::mAspect [protected]
 

x/y viewport ratio - default 1.3333.

Vector3 Ogre::Camera::mAutoTrackOffset [protected]
 

Tracking offset for fine tuning.

SceneNode* Ogre::Camera::mAutoTrackTarget [protected]
 

SceneNode which this Camera will automatically track.

Real Ogre::Camera::mCoeffB[2] [protected]
 

Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes.

Real Ogre::Camera::mCoeffL[2] [protected]
 

Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes.

Real Ogre::Camera::mCoeffR[2] [protected]
 

Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes.

Real Ogre::Camera::mCoeffT[2] [protected]
 

Temp coefficient values calculated from a frustum change, used when establishing the frustum planes when the view changes.

Quaternion Ogre::Camera::mDerivedOrientation [protected]
 

Derived positions of parent orientation / position.

Vector3 Ogre::Camera::mDerivedPosition [protected]
 

Real Ogre::Camera::mFarDist [protected]
 

Far clip distance - default 10000.

Real Ogre::Camera::mFOVy [protected]
 

Camera y-direction field-of-view (default 45).

Plane Ogre::Camera::mFrustumPlanes[6] [protected]
 

The 6 main clipping planes.

Quaternion Ogre::Camera::mLastParentOrientation [protected]
 

Stored versions of parent orientation / position.

Vector3 Ogre::Camera::mLastParentPosition [protected]
 

String Ogre::Camera::mName [protected]
 

Camera name.

Real Ogre::Camera::mNearDist [protected]
 

Near clip distance - default 100.

Quaternion Ogre::Camera::mOrientation [protected]
 

Camera orientation, quaternion style.

SceneNode* Ogre::MovableObject::mParentNode [protected, inherited]
 

node to which this object is attached.

Vector3 Ogre::Camera::mPosition [protected]
 

Camera position - default (0,0,0).

Matrix4 Ogre::Camera::mProjMatrix [protected]
 

Pre-calced projection matrix.

ProjectionType Ogre::Camera::mProjType [protected]
 

Orthographic or perspective?

bool Ogre::Camera::mRecalcFrustum [protected]
 

Something's changed in the frustrum shape?

bool Ogre::Camera::mRecalcView [protected]
 

Something re the view pos has changed.

RenderQueueGroupID Ogre::MovableObject::mRenderQueueID [protected, inherited]
 

The render queue to use when rendering this object.

SceneDetailLevel Ogre::Camera::mSceneDetail [protected]
 

Rendering type.

Real Ogre::Camera::mSceneLodFactor [protected]
 

Real Ogre::Camera::mSceneLodFactorInv [protected]
 

Inverted scene LOD factor, can be used by Renderables to adjust their LOD.

SceneManager* Ogre::Camera::mSceneMgr [protected]
 

Scene manager responsible for the scene.

String Ogre::Camera::msMovableType = "Camera" [static, protected]
 

Shared class-level name for Movable type.

UserDefinedObject* Ogre::MovableObject::mUserObject [protected, inherited]
 

User defined object which is linked to this object.

Matrix4 Ogre::Camera::mViewMatrix [protected]
 

Pre-calced view matrix.

unsigned int Ogre::Camera::mVisFacesLastRender [protected]
 

Stored number of visible faces in the last render.

bool Ogre::MovableObject::mVisible [protected, inherited]
 

Is this object visible?

bool Ogre::Camera::mYawFixed [protected]
 

Whether to yaw around a fixed axis.

Vector3 Ogre::Camera::mYawFixedAxis [protected]
 

Fixed axis to yaw around.

Copyright © 2002 by The OGRE Team