#include <soundsensor.h>
Inherits Sensor.
Inheritance diagram for SoundSensor:
Public Types | |
Segments | |
Angle | |
AngleVel | |
enum | Measure { Segments, Angle, AngleVel } |
Public Member Functions | |
SoundSensor (Dimensions dim=Z, Measure measure=Angle, int segments=1, int levels=1, float maxDistance=1000) | |
virtual | ~SoundSensor () |
virtual void | init (Primitive *own) |
initialises sensor with body of robot. | |
virtual bool | sense (const GlobalData &globaldata) |
performs sense action | |
virtual int | getSensorNumber () const |
returns the number of sensors values produced by this sensor | |
virtual std::list< sensor > | get () const |
returns a list of sensor values (usually in the range [0,1] ) | |
virtual int | get (sensor *sensors, int length) const |
writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written |
enum Measure |
SoundSensor | ( | Dimensions | dim = Z , |
|
Measure | measure = Angle , |
|||
int | segments = 1 , |
|||
int | levels = 1 , |
|||
float | maxDistance = 1000 | |||
) |
dim | Up-axis of the robot (sometimes it is not Z) |
~SoundSensor | ( | ) | [virtual] |
int get | ( | sensor * | sensors, | |
int | length | |||
) | const [virtual] |
writes the sensor values (usually in the range [0,1] ) into the giben sensor array and returns the number of sensors written
sensors | call by refernce array which received the values | |
length | capacity of sensors array |
Implements Sensor.
std::list< sensor > get | ( | ) | const [virtual] |
int getSensorNumber | ( | ) | const [virtual] |
virtual void init | ( | Primitive * | own | ) | [inline, virtual] |
bool sense | ( | const GlobalData & | globaldata | ) | [virtual] |