Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

GBE::GMoveAgent Class Reference

Handles movements for forms. More...

#include <GMoveAgent.h>

Inheritance diagram for GBE::GMoveAgent:

Inheritance graph
[legend]
Collaboration diagram for GBE::GMoveAgent:

Collaboration graph
[legend]
List of all members.

Public Slots

virtual void addSpeedImpulse (const GCS::GVector3 &add_speed)
virtual void addRotationImpulse (const GCS::GVector3 &rotation_impulse)

Public Member Functions

 GMoveAgent (double fraction_slow_down_per_sec=0, unsigned long update_interval_msec=20, QObject *parent=NULL, const char *name=NULL)
virtual ~GMoveAgent ()
unsigned long interval ()
void setInterval (unsigned long new_interval_msec)

Protected Slots

virtual void updateForm ()

Protected Member Functions

virtual void run ()

Protected Attributes

QTime Time
double SlowDownFraction
unsigned long Interval

Detailed Description

Handles movements for forms.

This agent periodically updates the forms position according to the current speed.

See also:
GCS::GForm


Constructor & Destructor Documentation

GBE::GMoveAgent::GMoveAgent double  fraction_slow_down_per_sec = 0,
unsigned long  update_interval_msec = 20,
QObject *  parent = NULL,
const char *  name = NULL
 

Constructor.

GBE::GMoveAgent::~GMoveAgent  )  [virtual]
 

Destructor.


Member Function Documentation

void GBE::GMoveAgent::addRotationImpulse const GCS::GVector3 rotation_impulse  )  [virtual, slot]
 

Adds given rotation impulse around given axis to the form's rotation speed.

void GBE::GMoveAgent::addSpeedImpulse const GCS::GVector3 add_speed  )  [virtual, slot]
 

Adds given speed impulse to the form's speed.

unsigned long GBE::GMoveAgent::interval  ) 
 

Returns:
the current interval.
See also:
Interval;

void GBE::GMoveAgent::run  )  [protected, virtual]
 

Constantly updates the forms position and also slows down according to SlowDownFactor.

See also:
Interval, SlowDownFactor, updateForm()

Reimplemented from GCS::GAgent.

void GBE::GMoveAgent::setInterval unsigned long  new_interval_msec  ) 
 

Sets the update interval.

See also:
Interval, interval()

void GBE::GMoveAgent::updateForm  )  [protected, virtual, slot]
 

Here the actual updating is performed.

See also:
run()


Member Data Documentation

unsigned long GBE::GMoveAgent::Interval [protected]
 

Update interval.

double GBE::GMoveAgent::SlowDownFraction [protected]
 

Subtracts CurrentSpeed*SlowDownFraction*elapsed_time from CurrentSpeed every update.

QTime GBE::GMoveAgent::Time [protected]
 

Used to measure time intervals between updates.


The documentation for this class was generated from the following files:
Generated on Thu Oct 21 21:18:12 2004 for G System by doxygen 1.3.6