WCamera Class Reference

Public Member Functions | |
WCamera (World *world, QString name, WObject *attachTo, unsigned int width=200, unsigned int height=200) | |
Construct a WCamera the point of view is positioned at 'attachTo' position and orientated as the Z axis of the 'attachTo' object. | |
WCamera (World *world, QString name, unsigned int width=200, unsigned int height=200, const wMatrix &tm=wMatrix::identity()) | |
Construct a WCamera the point of view is positioned at 'attachTo' position and orientated as the Z axis of the 'attachTo' object. | |
~WCamera () | |
Destructor. | |
WObject * | attachedTo () |
Return the object on which the WCamera is attached on. | |
yarp::dev::IFrameGrabberImage * | getFrameGrabber () |
Returns the YARP frame grabber object. | |
virtual void | postUpdate () |
update the WCamera generating a new frame | |
virtual void | preUpdate () |
PreUpdate operations. |
Detailed Description
WCamera class.
\
- Motivation
- The WCamera represent a camera.
- Description
- The images are sended via YARP port and they can be viewed as an image YARP image viewer.
- Warnings
- Warnings
Constructor & Destructor Documentation
WCamera | ( | World * | world, |
QString | name, | ||
WObject * | attachTo, | ||
unsigned int | width = 200 , |
||
unsigned int | height = 200 |
||
) |
Construct a WCamera the point of view is positioned at 'attachTo' position and orientated as the Z axis of the 'attachTo' object.
- Parameters:
-
world is the world that WCamera show to you name of the camera, this is mandatory because it will be used as the YARP port name attachTo is the WObject which this WCamera is mounted width is the pixel width of image produced by WCamera height is the pixel height of image produce by WCamera
Definition at line 163 of file wcamera.cpp.
References WObject::matrix(), WObject::name(), WObject::setMatrix(), RenderWObjectContainer::setWorld(), and WObject::world().
WCamera | ( | World * | world, |
QString | name, | ||
unsigned int | width = 200 , |
||
unsigned int | height = 200 , |
||
const wMatrix & | tm = wMatrix::identity() |
||
) |
Construct a WCamera the point of view is positioned at 'attachTo' position and orientated as the Z axis of the 'attachTo' object.
- Parameters:
-
world is the world that WCamera show to you name of the camera, this is mandatory because it will be used as the YARP port name width is the pixel width of image produced by WCamera height is the pixel height of image produce by WCamera tm rotation and position at the moment of creation
Definition at line 182 of file wcamera.cpp.
References WObject::name(), WObject::setMatrix(), RenderWObjectContainer::setWorld(), and WObject::world().
~WCamera | ( | ) |
Destructor.
Definition at line 200 of file wcamera.cpp.
Member Function Documentation
WObject* attachedTo | ( | ) | [inline] |
yarp::dev::IFrameGrabberImage* getFrameGrabber | ( | ) | [inline] |
Returns the YARP frame grabber object.
Definition at line 145 of file wcamera.h.
Referenced by PhyiCub::leftEyeFrameGrabber(), and PhyiCub::rightEyeFrameGrabber().
void postUpdate | ( | ) | [virtual] |
update the WCamera generating a new frame
- Note:
- I don't know if it's necessary to implement this, because doesn't matter if the World is changed or not, the WCamera should always generate 60 frame per seconds in real-time
Reimplemented from WObject.
Definition at line 210 of file wcamera.cpp.
References RenderCamera::paintGL().
void preUpdate | ( | ) | [virtual] |
PreUpdate operations.
Reimplemented from WObject.
Definition at line 204 of file wcamera.cpp.
References WObject::setMatrix().
The documentation for this class was generated from the following files:
- worldsim/include/wcamera.h
- worldsim/src/wcamera.cpp