File CameraWrapper.h

namespace Ogre

File: MovableText.h

Description: This creates a billboarding object that display a text. Note: This object must have a dedicated scene node since it will rotate it to face the camera (OGRE 2.1)

Author

2003 by cTh see gavocanov@rambler.ru 2006 by barraq see nospam@barraquand.com 2012 to work with newer versions of OGRE by MindCalamity mindcalamity@gmail.com 2015 to work on OGRE 2.1 (but not on older versions anymore) by Jayray jeremy.richert1@gmail.com

namespace Gsage
class CameraWrapper : public Gsage::MovableObjectWrapper<Ogre::Camera>, public Listener

Public Functions

CameraWrapper()
virtual ~CameraWrapper()
void setOrientation(const Ogre::Quaternion &orientation)

Sets camera orientation

Parameters
  • orientation: Ogre::Quaternion

const Ogre::Quaternion &getOrientation() const

Gets camera orientation

void attach(Ogre::Viewport *viewport)

Activate this camera

void attach(RenderTargetPtr renderTarget)

Attach the camera to render target

Parameters

void detach()

Detach camera from the render target

void createCamera(const std::string &name)

Create camera

Parameters
  • name: Camera name

Ogre::Camera *getCamera()

Get camera ogre object

const Ogre::Camera *getCamera() const

Get camera ogre object

const std::string &getName() const

Get camera name

void setClipDistance(const float &value)

Set camera clip distance

Parameters
  • value: Clip distance

float getClipDistance()

Get camera clip distance

void setBgColour(const Ogre::ColourValue &colour)

Set viewport background colour

Parameters
  • colour: ColourValue

const Ogre::ColourValue &getBgColour() const

Get viewport background colour

bool isActive() const

Check if camera is active

const Ogre::Matrix4 &getViewMatrix() const

Get view matrix

const Ogre::Matrix4 &getProjectionMatrix() const

Get projection matrix

void destroy()

Remove camera

void objectDestroyed(Ogre::MovableObject *cam)
RenderTargetPtr getRenderTarget()

Get render target camera attached to

Public Static Attributes

const std::string TYPE

Private Members

std::string mTarget
Ogre::ColourValue mBgColour
Ogre::Viewport *mViewport
Ogre::RenderWindow *mWindow
bool mIsActive
RenderTargetPtr mRenderTarget