#include <CircularCam.h>
Inheritance diagram for Enki::CircularCam:

The maximum aperture angle of this camera is PI, so this is not an omnicam. Pixels start at -halfFieldOfView and then follow mathematical orientation
Public Member Functions | |
| CircularCam (Robot *owner, Vector pos, double height, double orientation, double halfFieldOfView, unsigned pixelCount) | |
| Constructor. | |
| virtual | ~CircularCam () |
| Destructor. | |
| virtual void | init (double dt, World *w) |
| Init at each step. | |
| virtual void | objectStep (double dt, World *w, PhysicalObject *po) |
| Interact with object. | |
| virtual void | wallsStep (double dt, World *w) |
| Interact with walls. | |
| virtual void | finalize (double dt, World *w) |
| Finalize at each step. | |
| void | setRange (double range) |
| Change the sight range of the camera. | |
| Point | getAbsolutePosition (void) |
| Return the absolute position (world coordinates) of the camera, updated at each time step on init(). | |
| double | getAbsoluteOrientation (void) |
| Return the absolute orientation (world coordinates) of the camera, updated at each time step on init(). | |
Public Attributes | |
| std::valarray< double > | zbuffer |
| zbuffer: distances at square (array of size pixelCount of double) | |
| std::valarray< Color > | image |
| Image (array of size pixelCount of Color). | |
| double | halfFieldOfView |
| Field of view = [-halfFieldOfView; + halfFieldOfView]. [0; PI/2]. | |
| double | angleOffset |
| Angular offset based on owner angle. | |
| bool | useFog |
| Fog switch, exponential decay of light with distance. | |
| double | fogDensity |
| Density of fog, used to compute light attenuation with the function: light = light0 * exp(-fogDensity * distance). | |
| Color | lightThreshold |
| Minimum incoming light, otherwise 0. Only used if useFog is true. | |
| PixelOperationFunctor * | pixelOperation |
| Pointer to active pixel operation. | |
Protected Member Functions | |
| double | interpolateLinear (double s0, double s1, double sv, double d0, double d1) |
| Return linear interpolated value between d0 and d1, given a sensorvalue sv between s0 and s1. | |
| void | drawTexturedLine (const Point &p0, const Point &p1, const Texture &texture) |
| Draw a textured line from point p0 to p1 using texture - WTF are p0 and p1?? | |
Protected Attributes | |
| Vector | positionOffset |
| Position offset based on owner position. | |
| double | height |
| Height above ground, the camera will not see any object of smaller height. | |
| Vector | absPos |
| Absolute position in the world, updated on init(). | |
| double | absOrientation |
| Absolute angle in the world, updated on init(). | |
| Enki::CircularCam::CircularCam | ( | Robot * | owner, | |
| Vector | pos, | |||
| double | height, | |||
| double | orientation, | |||
| double | halfFieldOfView, | |||
| unsigned | pixelCount | |||
| ) |
Constructor.
| owner | robot this camera is attached to | |
| pos | position of this camera on the robot | |
| height | height of this camera with respect to ground | |
| orientation | orientation of this camera with respect to the robot front | |
| halfFieldOfView | half aperture of the camera. The real field of view is twice this value [0; PI/2] | |
| pixelCount | number of pixel to cover the full field of view |
| void Enki::CircularCam::objectStep | ( | double | dt, | |
| World * | w, | |||
| PhysicalObject * | po | |||
| ) | [virtual] |
Interact with object.
| dt | time step | |
| po | object to interact with | |
| w | world where the interaction takes place |
Reimplemented from Enki::LocalInteraction.
| void Enki::CircularCam::wallsStep | ( | double | dt, | |
| World * | w | |||
| ) | [virtual] |
Interact with walls.
| w | world to which interact |
Reimplemented from Enki::LocalInteraction.
1.5.1