IRSensorController Class Reference
The base abstract class of sensor controllers for infrared sensors. More...

Public Member Functions | |
IRSensorController (World *world, unsigned int numSensors) | |
Constructor. | |
virtual | ~IRSensorController () |
Destructor. | |
double | activation (int i) const |
Returns the activation of the i-th sensors. | |
int | nSensors () const |
Returns the number of sensors. | |
Protected Attributes | |
QVector< double > | m_activations |
The vector with sensors activations. |
Detailed Description
The base abstract class of sensor controllers for infrared sensors.
This is an abstract base class providing an uniform interface for different implementations, use one of its subclasses below. This class only provides a vector of activations (m_activations) which must be filled in the update() function by subclasses
Definition at line 131 of file sensorcontrollers.h.
Constructor & Destructor Documentation
IRSensorController | ( | World * | world, |
unsigned int | numSensors | ||
) |
Constructor.
- Parameters:
-
world the world in which we live numSensors the number of proximity IR sensors
Definition at line 44 of file sensorcontrollers.cpp.
~IRSensorController | ( | ) | [virtual] |
Destructor.
Definition at line 50 of file sensorcontrollers.cpp.
Member Function Documentation
double activation | ( | int | i | ) | const [inline] |
Returns the activation of the i-th sensors.
- Parameters:
-
i the index of the sensor whose activation value should be returned
- Returns:
- the activation of the i-th sensor
Definition at line 162 of file sensorcontrollers.h.
int nSensors | ( | ) | const [inline] |
Returns the number of sensors.
Definition at line 150 of file sensorcontrollers.h.
Member Data Documentation
QVector<double> m_activations [protected] |
The vector with sensors activations.
Definition at line 171 of file sensorcontrollers.h.
Referenced by SimulatedIRGroundSensorController::update(), and SimulatedIRProximitySensorController::update().
The documentation for this class was generated from the following files:
- worldsim/include/sensorcontrollers.h
- worldsim/src/sensorcontrollers.cpp