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


Public Slots | |
| virtual void | createAndSendBasicInfluence (double fraction_of_own_energy, unsigned long targetID=0) |
| virtual void | followTarget (unsigned long destinationElementID) |
| virtual void | setSpeed (const GCS::GVector3 &new_speed) |
Signals | |
| void | influenceReceived (const GCS::GElementInfluence &i) |
| void | knownElementsListChanged (const QStringList &known_elements) |
Public Member Functions | |
| GInvestigationAgent (GWE::GWEInterface *gwe, int update_interval_msec=500, QObject *parent=0, const char *name=0) | |
Protected Slots | |
| virtual void | sendChangedSignals () |
Protected Member Functions | |
| virtual void | run () |
| virtual void | receiveInfluence (GCS::GElementInfluence &influence) |
Protected Attributes | |
| QTimer | UpdateTimer |
| QValueList< GCS::GElementID > | KnownElements |
| bool | KnownElementsEmitPending |
| GWE::GWEInterface * | Gwe |
| int | UpdateInterval |
| unsigned long | CurrentTarget |
| GCS::GVector3 | CurrentSpeed |
The investigation agent uses a direct pointer to a GWE to access data from other elements, this is NOT standard and shouldn't be done in other agents.
|
||||||||||||
|
Creates a standard GElementInfluence object and sends it to given ID, if ID == 0 (default value) then it is radiated |
|
|
Makes this element move to given ID and follow it
|
|
|
Emitted every time an influence had been received |
|
|
Emitted every time the KnownElements list has changed |
|
|
Here the agent basically adds the received influence amount to EnergyAmountReceived.
Reimplemented from GCS::GAgent. |
|
|
Constantly accelerates towards the element with the ID of currentTarget. Reimplemented from GCS::GAgent. |
|
|
Sends updates about form and energy.
|
|
|
Sets the speed attribute.
|
|
|
Sets the current speed of the element, the agent will try force this onto the form's speed attribute.
|
|
|
The investigation element is following this target |
|
|
Used to get exact locations of elements (for movement,...). |
|
|
All elements that get in contact with this investigation element (i.e. from which influences where received) are listed here.
|
|
|
If set to true and the changed signals are emitted, then the known elements are also emited with the knownElementsListChanged() signal.
|
|
|
Determines the time between emitting of updates. |
|
|
Update timer used for energyChanged and formChanged signals. |
1.3.6