Class to create an interactive videocamera in Irrlicht, that is similar to the Maya camera but hasn't the problems that the Maya camera has in Irrlicht 1.5.

This code is based on work by "CmdKewin" (from the Irrlicht forum).

#include <ChIrrCamera.h>

Inherits ICameraSceneNode.

Public Member Functions

 RTSCamera (irr::IrrlichtDevice *devicepointer, irr::scene::ISceneNode *parent, irr::scene::ISceneManager *smgr, irr::s32 id, irr::f32 rotateSpeed=-160.0f, irr::f32 zoomSpeed=1.0f, irr::f32 translationSpeed=0.003f)
virtual void render ()
virtual bool OnEvent (const irr::SEvent &event)
virtual void OnRegisterSceneNode ()
virtual void OnAnimate (irr::u32 timeMs)
virtual void setInputReceiverEnabled (bool enabled)
virtual bool isInputReceiverEnabled () const
virtual const irr::core::aabbox3d< irr::f32 > & getBoundingBox () const
virtual const irr::core::matrix4 & getProjectionMatrix () const
virtual const irr::scene::SViewFrustum * getViewFrustum () const
virtual const irr::core::matrix4 & getViewMatrix () const
virtual const irr::core::matrix4 & getViewMatrixAffector () const
virtual const irr::core::vector3df & getUpVector () const
virtual const irr::core::vector3df & getTarget () const
virtual irr::f32 getNearValue () const
virtual irr::f32 getFarValue () const
virtual irr::f32 getAspectRatio () const
virtual irr::f32 getFOV () const
virtual void setNearValue (irr::f32 zn)
virtual void setFarValue (irr::f32 zf)
virtual void setAspectRatio (irr::f32 aspect)
virtual void setFOV (irr::f32 fovy)
virtual void setViewMatrixAffector (const irr::core::matrix4 &affector)
virtual void setUpVector (const irr::core::vector3df &pos)
virtual void setProjectionMatrix (const irr::core::matrix4 &projection, bool isOrthogonal=false)
virtual void setPosition (const irr::core::vector3df &newpos)
virtual void setTarget (const irr::core::vector3df &newpos)
virtual void setRotation (const irr::core::vector3df &rotation)
virtual void setZoomSpeed (irr::f32 value)
virtual void setTranslateSpeed (irr::f32 value)
virtual void setRotationSpeed (irr::f32 value)
virtual void bindTargetAndRotation (bool bound)
virtual bool getTargetAndRotationBinding (void) const
void pointCameraAtNode (ISceneNode *selectednode)
void setMinZoom (irr::f32 amount)
void setMaxZoom (irr::f32 amount)
virtual irr::scene::ESCENE_NODE_TYPE getType () const

Public Attributes

bool atMinDistance
bool atMaxDistance
ISceneNode * selectednode

Protected Member Functions

void recalculateProjectionMatrix ()
 Z-value of the far view-plane.
void recalculateViewArea ()

Protected Attributes

irr::core::vector3df Target
irr::core::vector3df UpVector
irr::core::matrix4 Projection
irr::core::matrix4 View
irr::core::matrix4 Affector
irr::scene::SViewFrustum ViewArea
irr::core::aabbox3d< irr::f32 > BBox
bool InputReceiverEnabled
irr::core::dimension2d< irr::f32 > screenDim
irr::f32 Fovy
irr::f32 Aspect
 Field of view, in radians.
irr::f32 ZNear
 Aspect ratio.
irr::f32 ZFar
 Value of the near view-plane.