Class for sensing the axis orienation of a primitive (robot). More...
#include <axisorientationsensor.h>
Inherits lpzrobots::Sensor.

Public Types | |
| enum | Mode { OnlyZAxis, ZProjection, Axis } |
Sensor mode. More... | |
Public Member Functions | |
| AxisOrientationSensor (Mode mode, short dimensions=X|Y|Z) | |
| virtual | ~AxisOrientationSensor () |
| virtual void | init (Primitive *own) |
| initialises sensor with body of robot. | |
| virtual int | getSensorNumber () const |
| returns the number of sensors values produced by this sensor | |
| virtual bool | sense (const GlobalData &globaldata) |
| performs sense action | |
| virtual std::list< sensor > | get () const |
| returns a list of sensor values (usually in the range [0,1] ) This function should be overloaded. | |
| virtual int | get (sensor *sensors, int length) const |
| writes the sensor values (usually in the range [0,1] ) into the given sensor array and returns the number of sensors written. | |
Class for sensing the axis orienation of a primitive (robot).
| enum Mode |
Sensor mode.
| AxisOrientationSensor | ( | Mode | mode, | |
| short | dimensions = X | Y | Z | |||
| ) |
| mode | how to measure the axis orientation | |
| dimensions | bit mask for the dimensions to sense. Default: X | Y | Z (all dimensions) |
| virtual ~AxisOrientationSensor | ( | ) | [inline, virtual] |
| int get | ( | sensor * | sensors, | |
| int | length | |||
| ) | const [virtual] |
writes the sensor values (usually in the range [0,1] ) into the given sensor array and returns the number of sensors written.
A default implementation based on get() is provided. Only of performance matters overwrite this function.
| sensors | call by refernce array which received the values | |
| length | capacity of sensors array |
Reimplemented from Sensor.
| std::list< sensor > get | ( | ) | const [virtual] |
returns a list of sensor values (usually in the range [0,1] ) This function should be overloaded.
Implements Sensor.
| int getSensorNumber | ( | ) | const [virtual] |
returns the number of sensors values produced by this sensor
Implements Sensor.
| void init | ( | Primitive * | own | ) | [virtual] |
| bool sense | ( | const GlobalData & | globaldata | ) | [virtual] |
performs sense action
Implements Sensor.
1.6.3