OGRE  1.12.13
Object-Oriented Graphics Rendering Engine
OgreBites::CameraMan Class Reference

Utility class for controlling the camera in samples. More...

#include <OgreCameraMan.h>

+ Inheritance diagram for OgreBites::CameraMan:

Public Member Functions

 CameraMan (Ogre::SceneNode *cam)
 
void frameRendered (const Ogre::FrameEvent &evt)
 
Ogre::SceneNodegetCamera ()
 
CameraStyle getStyle ()
 
Ogre::SceneNodegetTarget ()
 
Ogre::Real getTopSpeed ()
 
bool keyPressed (const KeyboardEvent &evt)
 Processes key presses for free-look style movement. More...
 
bool keyReleased (const KeyboardEvent &evt)
 Processes key releases for free-look style movement. More...
 
void manualStop ()
 Manually stops the camera when in free-look mode. More...
 
bool mouseMoved (const MouseMotionEvent &evt)
 Processes mouse movement differently for each style. More...
 
bool mousePressed (const MouseButtonEvent &evt)
 Processes mouse presses. More...
 
bool mouseReleased (const MouseButtonEvent &evt)
 Processes mouse releases. More...
 
bool mouseWheelRolled (const MouseWheelEvent &evt)
 
void setCamera (Ogre::SceneNode *cam)
 Swaps the camera on our camera man for another camera. More...
 
void setFixedYaw (bool fixed)
 fix the yaw axis to be Vector3::UNIT_Y of the parent node (tabletop mode) More...
 
void setPivotOffset (const Ogre::Vector3 &offset)
 
virtual void setStyle (CameraStyle style)
 Sets the movement style of our camera man. More...
 
virtual void setTarget (Ogre::SceneNode *target)
 Sets the target we will revolve around. More...
 
void setTopSpeed (Ogre::Real topSpeed)
 Sets the camera's top speed. More...
 
void setYawPitchDist (const Ogre::Radian &yaw, const Ogre::Radian &pitch, Ogre::Real dist)
 Sets the spatial offset from the target. More...
 
- Public Member Functions inherited from OgreBites::InputListener
virtual ~InputListener ()
 
virtual bool axisMoved (const AxisEvent &evt)
 
virtual bool buttonPressed (const ButtonEvent &evt)
 
virtual bool buttonReleased (const ButtonEvent &evt)
 
virtual bool textInput (const TextInputEvent &evt)
 
virtual bool touchMoved (const TouchFingerEvent &evt)
 
virtual bool touchPressed (const TouchFingerEvent &evt)
 
virtual bool touchReleased (const TouchFingerEvent &evt)
 

Detailed Description

Utility class for controlling the camera in samples.

Constructor & Destructor Documentation

◆ CameraMan()

OgreBites::CameraMan::CameraMan ( Ogre::SceneNode cam)

Member Function Documentation

◆ setCamera()

void OgreBites::CameraMan::setCamera ( Ogre::SceneNode cam)

Swaps the camera on our camera man for another camera.

◆ getCamera()

Ogre::SceneNode* OgreBites::CameraMan::getCamera ( )
inline

◆ setTarget()

virtual void OgreBites::CameraMan::setTarget ( Ogre::SceneNode target)
virtual

Sets the target we will revolve around.

Only applies for orbit style.

◆ getTarget()

Ogre::SceneNode* OgreBites::CameraMan::getTarget ( )
inline

◆ setYawPitchDist()

void OgreBites::CameraMan::setYawPitchDist ( const Ogre::Radian yaw,
const Ogre::Radian pitch,
Ogre::Real  dist 
)

Sets the spatial offset from the target.

Only applies for orbit style.

◆ setTopSpeed()

void OgreBites::CameraMan::setTopSpeed ( Ogre::Real  topSpeed)
inline

Sets the camera's top speed.

Only applies for free-look style.

◆ getTopSpeed()

Ogre::Real OgreBites::CameraMan::getTopSpeed ( )
inline

◆ setStyle()

virtual void OgreBites::CameraMan::setStyle ( CameraStyle  style)
virtual

Sets the movement style of our camera man.

◆ getStyle()

CameraStyle OgreBites::CameraMan::getStyle ( )
inline

◆ manualStop()

void OgreBites::CameraMan::manualStop ( )

Manually stops the camera when in free-look mode.

◆ frameRendered()

void OgreBites::CameraMan::frameRendered ( const Ogre::FrameEvent evt)
virtual

Reimplemented from OgreBites::InputListener.

◆ keyPressed()

bool OgreBites::CameraMan::keyPressed ( const KeyboardEvent evt)
virtual

Processes key presses for free-look style movement.

Reimplemented from OgreBites::InputListener.

◆ keyReleased()

bool OgreBites::CameraMan::keyReleased ( const KeyboardEvent evt)
virtual

Processes key releases for free-look style movement.

Reimplemented from OgreBites::InputListener.

◆ mouseMoved()

bool OgreBites::CameraMan::mouseMoved ( const MouseMotionEvent evt)
virtual

Processes mouse movement differently for each style.

Reimplemented from OgreBites::InputListener.

◆ mouseWheelRolled()

bool OgreBites::CameraMan::mouseWheelRolled ( const MouseWheelEvent evt)
virtual

Reimplemented from OgreBites::InputListener.

◆ mousePressed()

bool OgreBites::CameraMan::mousePressed ( const MouseButtonEvent evt)
virtual

Processes mouse presses.

Only applies for orbit style. Left button is for orbiting, and right button is for zooming.

Reimplemented from OgreBites::InputListener.

◆ mouseReleased()

bool OgreBites::CameraMan::mouseReleased ( const MouseButtonEvent evt)
virtual

Processes mouse releases.

Only applies for orbit style. Left button is for orbiting, and right button is for zooming.

Reimplemented from OgreBites::InputListener.

◆ setFixedYaw()

void OgreBites::CameraMan::setFixedYaw ( bool  fixed)
inline

fix the yaw axis to be Vector3::UNIT_Y of the parent node (tabletop mode)

otherwise the yaw axis can change freely

References Ogre::Node::TS_LOCAL, and Ogre::Node::TS_PARENT.

◆ setPivotOffset()

void OgreBites::CameraMan::setPivotOffset ( const Ogre::Vector3 offset)

The documentation for this class was generated from the following file: