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

GBE::GAttractAgent Class Reference

Moves towards elements with similar energy. More...

#include <GAttractAgent.h>

Inheritance diagram for GBE::GAttractAgent:

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

Collaboration graph
[legend]
List of all members.

Public Slots

virtual void receiveInfluence (GCS::GElementInfluence &influence)

Public Member Functions

 GAttractAgent (double factor=1, QObject *parent=0, const char *name=0)
virtual ~GAttractAgent ()

Protected Attributes

double Factor

Detailed Description

Moves towards elements with similar energy.

Author:
Raphael Langerhorst
When an influence is received and the influence type is GPositionalInfluence then the agent accelerates towards the source of the influence. This is only done when a form is available, since formless elements are also positionless.


Constructor & Destructor Documentation

GBE::GAttractAgent::GAttractAgent double  factor = 1,
QObject *  parent = 0,
const char *  name = 0
 

Constructor

GBE::GAttractAgent::~GAttractAgent  )  [virtual]
 

Virtual destructor for subclassing.


Member Function Documentation

void GBE::GAttractAgent::receiveInfluence GCS::GElementInfluence influence  )  [virtual, slot]
 

Reimplements GAgent::receiveInfluence(). Acceleration towards the source of the influence is implemented here. The attraction force also depends on how much alike the influence energy level and the own energy level are.

See also:
GCS::GEnergy, GCS::GElementInfluence.

Reimplemented from GCS::GAgent.


Member Data Documentation

double GBE::GAttractAgent::Factor [protected]
 

Common acceleration factor.


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