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


Public Member Functions | |
| GEnergyFormAgent () | |
| virtual | ~GEnergyFormAgent () |
| void | initRangeMin (double energy_level_min) |
| void | initRangeMax (double energy_level_max) |
| void | initAlpha (double alpha_colour_component) |
| void | initSizeFactor (const GCS::GVector3 &size_factor) |
| void | initColourEnabled (bool enabled) |
| void | initSizeFactorEnabled (bool enabled) |
Protected Member Functions | |
| virtual void | run () |
The colour ranges from dark blue to yellow-white between LevelRangeMin and LevelRangeMax.
The sizefactor is directly reflected in the form's ellipsoid attribute.
Adds the following xml data to the element data:
<appearance>
<energyrange>
<minlevel>double value</minlevel>
<maxlevel>double value</maxlevel>
</energyrange>
<colour> <!-- periodically updated in the run() method of the agent -->
<enabled>bool</enabled> <!-- if false then the whole colour tag can be ignored -->
<r>double value</r>
<g>double value</g>
<b>double value</b>
<a>double value</a> <!-- not updated, but set with initAlpha() -->
</colour>
</appearance>
<form>
<sizefactor>
<enabled>bool</enabled> <!-- if false then the whole form sizefactor can be ignored -->
<x>double value</x>
<y>double value</y>
<z>double value</z>
</sizefactor>
</form>
| GBE::GEnergyFormAgent::GEnergyFormAgent | ( | ) |
Constructor.
| GBE::GEnergyFormAgent::~GEnergyFormAgent | ( | ) | [virtual] |
Destructor.
| void GBE::GEnergyFormAgent::initAlpha | ( | double | alpha_colour_component | ) |
Initializes alpha colour value in the element data.
The alpha component of the colour is not updated by the agent, it can be set here and won't be changed afterwards.
| void GBE::GEnergyFormAgent::initColourEnabled | ( | bool | enabled | ) |
Enables or disables colour updating based on energy level. Enabled by default.
| void GBE::GEnergyFormAgent::initRangeMax | ( | double | energy_level_max | ) |
Initializes energy range min in the element data. The minimum energy level is used to determine where the appearance should be dark.
| void GBE::GEnergyFormAgent::initRangeMin | ( | double | energy_level_min | ) |
Initializes energy range max in the element data.
The maximum energy level is used to determine where the appearance should be light.
| void GBE::GEnergyFormAgent::initSizeFactor | ( | const GCS::GVector3 & | size_factor | ) |
Initializes size factor in the element data.
The radius of the form is determined by the energy amount multiplied with given factors.
| void GBE::GEnergyFormAgent::initSizeFactorEnabled | ( | bool | enabled | ) |
Enables or disables form size updating based on energy amount. Enabled by default.
| void GBE::GEnergyFormAgent::run | ( | ) | [protected, virtual] |
Periodically updates the form of the element according to the current energy.
Reimplemented from GCS::GAgent.
1.4.7