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