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. | |
![]() | |
SensorController (World *world) | |
Constructor. | |
virtual | ~SensorController () |
Destructor. | |
bool | isEnabled () |
Returns true if the sensor is enabled. | |
void | setEnabled (bool b) |
Enables/Disables this sensor controller. | |
virtual void | update ()=0 |
Updates the sensor reading. | |
World * | world () |
Returns the world. | |
![]() | |
Ownable () | |
Constructor. | |
virtual | ~Ownable () |
Destructor. | |
const QList< Owned > & | owned () const |
Returns the list of objects owned by this one. | |
Ownable * | owner () const |
Returns the owner of this object. | |
void | setOwner (Ownable *owner, bool destroy=true) |
Sets the owner of this object. | |
Protected Attributes | |
QVector< double > | m_activations |
The vector with sensors activations. | |
Additional Inherited Members | |
![]() | |
typedef QList< Owned > | OwnedList |
The type for the list of owned objects. | |
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 132 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 43 of file sensorcontrollers.cpp.
|
virtual |
Destructor.
Definition at line 49 of file sensorcontrollers.cpp.
Member Function Documentation
|
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 163 of file sensorcontrollers.h.
|
inline |
Returns the number of sensors.
Definition at line 151 of file sensorcontrollers.h.
Member Data Documentation
|
protected |
The vector with sensors activations.
Definition at line 172 of file sensorcontrollers.h.
Referenced by SimulatedIRProximitySensorController::update(), and SimulatedIRGroundSensorController::update().
The documentation for this class was generated from the following files:
- worldsim/include/sensorcontrollers.h
- worldsim/src/sensorcontrollers.cpp