#include <GMoveAgent.h>
Inheritance diagram for GBE::GMoveAgent:


Public Slots | |
| virtual QStringList | getAvailableActions () const |
| virtual QString | getActionDescription (const QString &action) const |
| virtual void | performAction (const QString &action, QStringList params) |
| virtual void | initTranslationSpeed (const GCS::GVector3 &speed) |
| virtual void | initRotationSpeed (const GCS::GVector3 &speed) |
| virtual void | initSlowDownFactor (double factor) |
| virtual void | initUpdateInterval (unsigned long interval) |
Public Member Functions | |
| GMoveAgent () | |
| virtual | ~GMoveAgent () |
Protected Slots | |
| virtual void | updateForm () |
Protected Member Functions | |
| virtual void | run () |
Protected Attributes | |
| QTime | Time |
This agent periodically updates the forms position according to the current speed.
Adds the following xml data to the element data:
<dynamics>
<slowdownfactor>double value</slowdownfactor>
<translationspeed>double value</translationspeed>
<rotationspeed>double value</rotationspeed>
<updateinterval>unsigned long integer value</updateinterval>
</dynamics>
| GBE::GMoveAgent::GMoveAgent | ( | ) |
Constructor.
| GBE::GMoveAgent::~GMoveAgent | ( | ) | [virtual] |
Destructor.
| QString GBE::GMoveAgent::getActionDescription | ( | const QString & | action | ) | const [virtual, slot] |
| QStringList GBE::GMoveAgent::getAvailableActions | ( | ) | const [virtual, slot] |
| void GBE::GMoveAgent::initRotationSpeed | ( | const GCS::GVector3 & | speed | ) | [virtual, slot] |
Initializes rotation speed in the element data.
| void GBE::GMoveAgent::initSlowDownFactor | ( | double | factor | ) | [virtual, slot] |
Initializes slow down fractor in the element data. This value should be between 0 and 1 to get some slowdown. If you set it higher than 1 it will actually accelerate.
| void GBE::GMoveAgent::initTranslationSpeed | ( | const GCS::GVector3 & | speed | ) | [virtual, slot] |
Initializes translation speed in the element data
| void GBE::GMoveAgent::initUpdateInterval | ( | unsigned long | interval | ) | [virtual, slot] |
Initializes update interval in the element data.
| void GBE::GMoveAgent::performAction | ( | const QString & | action, | |
| QStringList | params | |||
| ) | [virtual, slot] |
Known actions: addTranslationSpeedImpulse (param 1: "x, y, z") addRotationImpulse (param 1: "x, y, z") fullStop (no parameters)
| void GBE::GMoveAgent::run | ( | ) | [protected, virtual] |
Constantly updates the forms position and also slows down according to SlowDownFactor.
Reimplemented from GCS::GAgent.
| void GBE::GMoveAgent::updateForm | ( | ) | [protected, virtual, slot] |
Here the actual updating is performed.
Subtracts CurrentSpeed * SlowDownFraction*elapsed_time from CurrentSpeed for translation and rotation speed.
QTime GBE::GMoveAgent::Time [protected] |
Used to measure time intervals between updates.
1.4.7