#include <GCamera.h>
Inheritance diagram for GCE::GCamera:


Public Slots | |
| virtual void | update () |
| virtual void | setFrame (GOpenGLFrame *frame) |
| virtual void | connectMoveAgent (GBE::GMoveAgent *agent) |
| virtual void | formUpdated (const GCS::GForm &form) |
| virtual void | startCamera () |
| virtual void | stopCamera () |
| virtual void | setViewDistance (int new_distance_percent) |
| virtual void | setSpeedFactor (double speed_factor) |
Signals | |
| void | action (const QString &actionname, QStringList params) |
Public Member Functions | |
| GCamera (GOpenGLFrame *frame=NULL, QObject *parent=0) | |
| ~GCamera () | |
Protected Member Functions | |
| virtual bool | eventFilter (QObject *watched, QEvent *e) |
Protected Attributes | |
| QTime | KeyUpdateTime |
| GOpenGLFrame * | Frame |
| GCS::GForm | Form |
| QMutex | FormMutex |
| double | ViewDistancePercent |
| double | SpeedFactor |
| double | speedx |
| double | speedy |
| bool | shutdown |
| bool | left_key_down |
| bool | right_key_down |
| bool | up_key_down |
| bool | down_key_down |
| bool | space_key_down |
Currently it is very primitive and is intended to just meet the requirements of the demo application.
| GCE::GCamera::GCamera | ( | GOpenGLFrame * | frame = NULL, |
|
| QObject * | parent = 0 | |||
| ) |
Constructor.
| GCE::GCamera::~GCamera | ( | ) |
Destructor.
| void GCE::GCamera::action | ( | const QString & | actionname, | |
| QStringList | params | |||
| ) | [signal] |
Signal suitable to connect to GBE::GMoveAgent::performAction()
| void GCE::GCamera::connectMoveAgent | ( | GBE::GMoveAgent * | agent | ) | [virtual, slot] |
Connects movement actions of the camera to the agent through the action interface.
| bool GCE::GCamera::eventFilter | ( | QObject * | watched, | |
| QEvent * | e | |||
| ) | [protected, virtual] |
Filters user input.
| void GCE::GCamera::formUpdated | ( | const GCS::GForm & | form | ) | [virtual, slot] |
Updates the form that will be followed with camera position.
| void GCE::GCamera::setFrame | ( | GOpenGLFrame * | frame | ) | [virtual, slot] |
Sets the OpenGL frame that the camera uses.
| void GCE::GCamera::setSpeedFactor | ( | double | speed_factor | ) | [virtual, slot] |
Sets the speed factor.
| void GCE::GCamera::setViewDistance | ( | int | new_distance_percent | ) | [virtual, slot] |
Sets the ViewDistancePercent attribute.
| void GCE::GCamera::startCamera | ( | ) | [virtual, slot] |
Starts the camera thread.
| void GCE::GCamera::stopCamera | ( | ) | [virtual, slot] |
Stops the camera thread.
| void GCE::GCamera::update | ( | ) | [virtual, slot] |
Updates the view settings.
GCS::GForm GCE::GCamera::Form [protected] |
The camera will track exactly this form in terms of position. It is usually updated through the formUpdated(const GCS::GForm&) slot.
QMutex GCE::GCamera::FormMutex [protected] |
Used for locking the form to synchronize form updates.
GOpenGLFrame* GCE::GCamera::Frame [protected] |
the Camera object will use this frame for setting the viewing properties.
QTime GCE::GCamera::KeyUpdateTime [protected] |
Used to determine elapsed time to determine correct speed updates (when keys are pressed)
bool GCE::GCamera::shutdown [protected] |
If true then the thread will stop executing.
double GCE::GCamera::SpeedFactor [protected] |
Determines the actual speed of the camera.
double GCE::GCamera::speedx [protected] |
Positive value means right.
double GCE::GCamera::speedy [protected] |
Positive value means up.
double GCE::GCamera::ViewDistancePercent [protected] |
This determines where the camera position is placed in relation to the targeted form. the given distance is multiplied with the (max) radius of the form to get the distance between view position and view target. A value of 100 would for example place the camera exactly at the border of the form, a value of 200 should give a nice view.
1.4.7