Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Enki::CircularCam Class Reference
[Interaction classes]

#include <CircularCam.h>

Inheritance diagram for Enki::CircularCam:

Enki::LocalInteraction List of all members.

Detailed Description

1D Circular camera


Public Member Functions

 CircularCam (Robot *owner, An::Vector pos, double height, double orientation, double fieldOfView, unsigned pixelCount)
 Constructor. r is the vision radius and owner is the Sbot the camera belongs to.
virtual ~CircularCam ()
 Destructor.
virtual void init ()
 Init at each step.
virtual void objectStep (double dt, PhysicalObject *po, World *w)
 Interact with object.
virtual void wallsStep (World *w)
 Interact with walls.
virtual void finalize (double dt)
 Finalize at each step.
An::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 (array of size pixelCount of double)
std::valarray< An::Color > image
 Image (array of size pixelCount of Color).
double fieldOfView
 Field of view = [-fieldOfView; + fieldOfView]. [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).
An::Color lightThreshold
 Minimum incoming light, otherwise 0. Only used if useFog is true.
PixelOperationFunctorpixelOperation
 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 An::Point &p0, const An::Point &p1, const An::Texture &texture)
 Draw a textured line from point p0 to p1 using texture - WTF are p0 and p1??

Protected Attributes

An::Vector positionOffset
 Position offset based on owner position.
double height
 Height above ground, the camera will not see any object of smaller height.
An::Vector absPos
 Absolute position in the world, updated on init().
double absOrientation
 Absolute angle in the world, updated on init().


The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:33:58 2005 for Enki by  doxygen 1.4.2