WCamera Class Reference

WCamera class. More...

Inheritance diagram for WCamera:

List of all members.

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.
WObjectattachedTo ()
 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

Definition at line 109 of file wcamera.h.


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:
worldis the world that WCamera show to you
nameof the camera, this is mandatory because it will be used as the YARP port name
attachTois the WObject which this WCamera is mounted
widthis the pixel width of image produced by WCamera
heightis 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:
worldis the world that WCamera show to you
nameof the camera, this is mandatory because it will be used as the YARP port name
widthis the pixel width of image produced by WCamera
heightis the pixel height of image produce by WCamera
tmrotation 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]

Return the object on which the WCamera is attached on.

Definition at line 141 of file wcamera.h.

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: