190 bool isViewOutOfDate(
void)
const;
192 void invalidateFrustum(
void)
const;
194 void invalidateView(
void)
const;
201 virtual void setWindowImpl(
void)
const;
216 virtual void addListener(
Listener* l);
218 virtual void removeListener(
Listener* l);
243 void setPosition(
const Vector3& vec);
247 const Vector3& getPosition(
void)
const;
255 void moveRelative(
const Vector3& vec);
266 void setDirection(
const Vector3& vec);
270 Vector3 getDirection(
void)
const;
288 void lookAt(
const Vector3& targetPoint );
305 void roll(
const Radian& angle);
309 void yaw(
const Radian& angle);
313 void pitch(
const Radian& angle);
357 void _renderScene(
Viewport *vp,
bool includeOverlays);
365 void _notifyRenderedFaces(
unsigned int numfaces);
369 void _notifyRenderedBatches(
unsigned int numbatches);
373 unsigned int _getNumRenderedFaces(
void)
const;
377 unsigned int _getNumRenderedBatches(
void)
const;
381 const Quaternion& getDerivedOrientation(
void)
const;
384 const Vector3& getDerivedPosition(
void)
const;
387 Vector3 getDerivedDirection(
void)
const;
390 Vector3 getDerivedUp(
void)
const;
393 Vector3 getDerivedRight(
void)
const;
397 const Quaternion& getRealOrientation(
void)
const;
400 const Vector3& getRealPosition(
void)
const;
403 Vector3 getRealDirection(
void)
const;
409 Vector3 getRealRight(
void)
const;
412 void getWorldTransforms(
Matrix4* mat)
const;
415 const String& getMovableType(
void)
const;
436 void setAutoTracking(
bool enabled,
SceneNode*
const target = 0,
455 void setLodBias(
Real factor = 1.0);
461 Real getLodBias(
void)
const;
475 virtual void setLodCamera(
const Camera* lodCam);
483 virtual const Camera* getLodCamera()
const;
490 Ray getCameraToViewportRay(
Real screenx,
Real screeny)
const;
496 void getCameraToViewportRay(
Real screenx,
Real screeny,
Ray* outRay)
const;
509 Real screenTop,
Real screenRight,
Real screenBottom,
bool includeFarPlane =
false);
522 void getCameraToViewportBoxVolume(
Real screenLeft,
527 Real _getLodBiasInverse(
void)
const;
531 void _autoTrack(
void);
545 virtual void resetWindow (
void);
552 Real getBoundingRadius(
void)
const;
574 void setAutoAspectRatio(
bool autoratio);
578 bool getAutoAspectRatio(
void)
const;
608 const Vector3* getWorldSpaceCorners(
void)
const;
610 const Plane& getFrustumPlane(
unsigned short plane )
const;
612 bool projectSphere(
const Sphere& sphere,
615 Real getNearClipDistance(
void)
const;
617 Real getFarClipDistance(
void)
const;
619 const Matrix4& getViewMatrix(
void)
const;
628 const Matrix4& getViewMatrix(
bool ownFrustumOnly)
const;
646 virtual void synchroniseBaseSettingsWith(
const Camera* cam);
649 const Vector3& getPositionForViewUpdate(
void)
const;
651 const Quaternion& getOrientationForViewUpdate(
void)
const;
683 #endif // __Camera_H__
Representation of a ray in space, i.e.
A viewpoint from which the scene will be rendered.
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
Vector3 mAutoTrackOffset
Tracking offset for fine tuning.
Defines a plane in 3D space.
Real getPixelDisplayRatio() const
Returns an estimated ratio between a pixel and the display area it represents.
Frustum * getCullingFrustum(void) const
Returns the custom culling frustum in use.
A frustum represents a pyramid, capped at the near and far end which is used to represent either a vi...
Manages the organisation and rendering of a 'scene' i.e.
static const Vector3 ZERO
Viewport * getViewport(void) const
Get the last viewport which was attached to this camera.
A 3D box aligned with the x/y/z axes.
virtual void setUseRenderingDistance(bool use)
Set whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
Class representing a node in the scene graph.
bool mYawFixed
Whether to yaw around a fixed axis.
Quaternion mRealOrientation
Real world orientation/position of the camera.
unsigned int mVisBatchesLastRender
Stored number of visible batches in the last render.
Implementation of a Quaternion, i.e.
bool mWindowSet
Is viewing window used.
bool mRecalcWindow
Was viewing window changed.
Vector3 mPosition
Camera position - default (0,0,0)
Quaternion mOrientation
Camera orientation, quaternion style.
Real mSceneLodFactor
Scene LOD factor used to adjust overall LOD.
SceneNode * mAutoTrackTarget
SceneNode which this Camera will automatically track.
virtual void cameraPreRenderScene(Camera *cam)
Called prior to the scene being rendered with this camera.
SceneManager * mSceneMgr
Scene manager responsible for the scene.
A sphere primitive, mostly used for bounds checking.
void _notifyViewport(Viewport *viewport)
Notifies this camera that a viewport is using it.
vector< Listener * >::type ListenerList
bool mAutoAspectRatio
Whether aspect ratio will automatically be recalculated when a viewport changes its size...
Standard 3-dimensional vector.
virtual bool isWindowSet(void) const
Returns if a viewport window is being used.
std::ostream & operator<<(std::ostream &o, const TRect< T > &r)
Represents a convex volume bounded by planes.
const Camera * mLodCamera
Camera to use for LOD calculation.
Vector3 mYawFixedAxis
Fixed axis to yaw around.
virtual void cameraDestroyed(Camera *cam)
Called when the camera is being destroyed.
An abstraction of a viewport, i.e.
bool getUseMinPixelSize() const
Returns whether to use min display size calculations.
Real mSceneLodFactorInv
Inverted scene LOD factor, can be used by Renderables to adjust their LOD.
unsigned int mVisFacesLastRender
Stored number of visible faces in the last render.
virtual bool getUseRenderingDistance(void) const
Get whether this camera should use the 'rendering distance' on objects to exclude distant objects fro...
Wrapper class which indicates a given angle value is in Radians.
PolygonMode
The polygon mode to use when rasterising.
Frustum * mCullFrustum
Custom culling frustum.
static String msMovableType
Shared class-level name for Movable type.
static const Vector3 UNIT_Y
SceneNode * getAutoTrackTarget(void) const
Get the auto tracking target for this camera, if any.
FrustumPlane
Worldspace clipping planes.
bool mUseMinPixelSize
Whether or not the minimum display size of objects should take effect for this camera.
void setCullingFrustum(Frustum *frustum)
Tells the camera to use a separate Frustum instance to perform culling.
PolygonMode mSceneDetail
Rendering type.
Quaternion mDerivedOrientation
Derived orientation/position of the camera, including reflection.
Listener interface so you can be notified of Camera events.
virtual void cameraPostRenderScene(Camera *cam)
Called after the scene has been rendered with this camera.
const Vector3 & getAutoTrackOffset(void) const
Get the auto tracking offset for this camera, if it is auto tracking.
Viewport * mLastViewport
The last viewport to be added using this camera.
void setUseMinPixelSize(bool enable)
Sets whether to use min display size calculations.
bool mUseRenderingDistance
Whether or not the rendering distance of objects should take effect for this camera.
vector< Plane >::type mWindowClipPlanes
Windowed viewport clip planes.