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

GBE::GEnergyFormAgent Class Reference

Modifies the form according to the energy attributes. More...

#include <GEnergyFormAgent.h>

Inheritance diagram for GBE::GEnergyFormAgent:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 GEnergyFormAgent (double level_range_min=0, double level_range_max=10, QObject *parent=0, const char *name=0)
virtual ~GEnergyFormAgent ()

Protected Member Functions

virtual void run ()

Protected Attributes

double LevelRangeMin
double LevelRangeMax

Detailed Description

Modifies the form according to the energy attributes.

Author:
Raphael Langerhorst
The form of the element is modified according to energy. The energy level is represented by form colour, the energy amount is represented by form radius. For this to work the element needs to have an energy and a GOpenGLForm.

The colour ranges from dark blue to yellow-white between LevelRangeMin and LevelRangeMax.

The energy amount is currently mapped 1:1 to the form radius.

Todo:
add factor for energy amount to form radius mapping.


Constructor & Destructor Documentation

GBE::GEnergyFormAgent::GEnergyFormAgent double  level_range_min = 0,
double  level_range_max = 10,
QObject *  parent = 0,
const char *  name = 0
 

Constructor.

Parameters:
level_range_min energy level for dark blue
level_range_max energy level for yellow-white

GBE::GEnergyFormAgent::~GEnergyFormAgent  )  [virtual]
 

Destructor.


Member Function Documentation

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

Periodically updates the form of the element according to the current energy.

Reimplemented from GCS::GAgent.


Member Data Documentation

double GBE::GEnergyFormAgent::LevelRangeMax [protected]
 

The energy level at which (and above) the form colour is set to light yellow.

double GBE::GEnergyFormAgent::LevelRangeMin [protected]
 

The energy level at which (and below) the form colour is set to dark blue.


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