Abstract class for Ray-based sensors. More...
#include <raysensor.h>
Inherited by IRSensor.
Public Types | |
enum | rayDrawMode { drawNothing, drawRay, drawSensor, drawAll } |
Public Member Functions | |
RaySensor () | |
virtual | ~RaySensor () |
virtual RaySensor * | clone () const =0 |
virtual void | init (const OdeHandle &odeHandle, const OsgHandle &osgHandle, Primitive *body, const osg::Matrix pose, float range, rayDrawMode drawMode=drawSensor)=0 |
providing essential information | |
virtual void | reset ()=0 |
used for reseting the sensor value to a value of maximal distance. | |
virtual double | get ()=0 |
returns the sensor value (usually in the range [-1,1] ) | |
virtual void | setRange (float range)=0 |
set the range of the sensor | |
virtual void | update ()=0 |
updates the position of the osg nodes |
Abstract class for Ray-based sensors.
This are sensors which are based on distance measurements using the ODE geom class Ray. The sensor value is obtained by collisions. However of no collision is detected the sensor needs to ajust its output as well. Therefore a reset function is provided. See also RaySensorBank, which is an object for managing multiple ray sensors.
enum rayDrawMode |
RaySensor | ( | ) | [inline] |
virtual ~RaySensor | ( | ) | [inline, virtual] |
virtual double get | ( | ) | [pure virtual] |
returns the sensor value (usually in the range [-1,1] )
Implemented in IRSensor.
virtual void init | ( | const OdeHandle & | odeHandle, | |
const OsgHandle & | osgHandle, | |||
Primitive * | body, | |||
const osg::Matrix | pose, | |||
float | range, | |||
rayDrawMode | drawMode = drawSensor | |||
) | [pure virtual] |
providing essential information
odeHandle | OdeHandle | |
osgHandle | OsgHandle | |
body | primitive to which the sensor will be attached | |
pose | relative pose in respect to body in which the sensor will be placed | |
range | length of the sensor | |
drawMode | whether to draw nothing, sensor body, ray, or both |
Implemented in IRSensor.
virtual void reset | ( | ) | [pure virtual] |
used for reseting the sensor value to a value of maximal distance.
Implemented in IRSensor.
virtual void setRange | ( | float | range | ) | [pure virtual] |
virtual void update | ( | ) | [pure virtual] |
updates the position of the osg nodes
Implemented in IRSensor.