1
//! Camera sensor class.
5
* Describes general camera properties.
11
#ifndef CAMERASENSOR_H_
12
#define CAMERASENSOR_H_
14
#include <srCore/body/bodyBase.h>
15
#include <srCore/sensor/cameraSensorBase.h>
19
class CameraSensor: public CameraSensorBase
24
* \brief Initializes the sensor
26
* \param gm GameManager, which handles the corresponding robot
27
* \param attachedTo Body, where the camera is attached to
28
* \param pos Local position of the camera
29
* \param orient Local orientation of the camera
30
* \param flareAngle flare angle of the camera
31
* \param resolution resolution of the camera
32
* \param name name of the camera
36
CameraSensor(dtCore::RefPtr<BodyBase> attachedTo, osg::Vec3 pos, osg::Vec3 orient, float flareAngle = 1, osg::Vec2 resolution = osg::Vec2(256,256), const std::string &name="CameraSensor");
37
virtual ~CameraSensor() { printf("camera destructor \n"); value = NULL; };
39
//! sends command to retrieve data
40
void evaluate(ParameterReturnValue srv);
42
inline void getNewSensorValue() {requestData();}
45
osg::ref_ptr<osg::Image> value;
48
inline void getSensorValue(std::ostream& theStream) const { theStream << value;}
53
#endif /*CAMERASENSOR_H_*/