~robot3d-team/robot3d/trunk

« back to all changes in this revision

Viewing changes to inc/srCore/sensor/lightSensor.h

  • Committer: Anne van Rossum
  • Date: 2010-08-10 15:58:55 UTC
  • Revision ID: anne@gamix-20100810155855-kve7x2vwouagdij9
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//! Light Sensor class.
 
2
 
 
3
/*!
 
4
 *
 
5
 * Describes general light sensor properties.
 
6
 *
 
7
 * @author Lutz Winkler
 
8
 *
 
9
 */
 
10
 
 
11
#ifndef LIGHTSENSOR_H_
 
12
#define LIGHTSENSOR_H_
 
13
 
 
14
#include "cameraSensorBase.h"
 
15
 
 
16
namespace srCore {
 
17
 
 
18
 
 
19
 
 
20
class LightSensor: public CameraSensorBase
 
21
{
 
22
public:
 
23
 
 
24
        /**
 
25
                 * \brief  Initializes the sensor
 
26
                 *
 
27
                 * \param                       gm                                                      GameManager, which handles the corresponding robot
 
28
                 * \param                       attachedTo                                      Body, where the sensor is attached to
 
29
                 * \param               pos                                                     Local position of the sensor
 
30
                 * \param                       orient                                          Local orientation of the sensor
 
31
                 * \param                       flareAngle                                      flare angle of the sensor
 
32
                 * \param                       name                                            name of the sensor
 
33
                 *
 
34
                 *
 
35
                 */
 
36
        LightSensor(dtCore::RefPtr<BodyBase> attachedTo, osg::Vec3 pos, osg::Vec3 orient, float flareAngle, const std::string &name="LightSensor");
 
37
        virtual ~LightSensor();
 
38
        //const std::string TakeScreenShot(const std::string& namePrefix);
 
39
 
 
40
        /**
 
41
         * \brief       Calculates a new sensor value
 
42
         *
 
43
         * It will be called every time step if it is an active sensor, otherwise it needs to be called by the controller
 
44
         *
 
45
         */
 
46
        virtual void getNewSensorValue();
 
47
 
 
48
        //! sends command to retrieve data
 
49
        void evaluate(ParameterReturnValue srv);
 
50
 
 
51
protected:
 
52
        virtual void getSensorValue(std::ostream& theStream) const;
 
53
 
 
54
 
 
55
private:
 
56
        unsigned int value;
 
57
 
 
58
};
 
59
}
 
60
 
 
61
#endif /*LIGHTSENSOR_H_*/