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. | |
Public Member Functions inherited from YarpObject | |
YarpObject (World *world, QString name, const wMatrix &tm=wMatrix::identity()) | |
Create a YarpObject; The name is mandatory because it is used as root name for each devices of this object. | |
virtual | ~YarpObject () |
Destroy the YarpObject. | |
yarp::dev::PolyDriver * | polydriver (QString name) |
return the PolyDriver with the given name associated to it | |
Public Member Functions inherited from WObject | |
WObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity(), bool addToWorld=true) | |
create the object and automatically put this into the world | |
virtual | ~WObject () |
destroy the Object and drop it from the world | |
QColor | color () const |
return the color of this object | |
bool | isInvisible () |
return if it is invisible | |
const wMatrix & | matrix () const |
return a reference to the transformation matrix | |
QString | name () const |
Return the name of this object. | |
void | setAlpha (int alpha) |
set the value of alpha channel (the transparency) | |
void | setColor (QColor c) |
Set the color to use on rendering. | |
void | setInvisible (bool b) |
set invisibility | |
void | setMatrix (const wMatrix &newm) |
set a new matrix | |
void | setPosition (const wVector &newpos) |
set the position specified in global coordinate frame | |
void | setPosition (real x, real y, real z) |
set the position specified in global coordinate frame | |
void | setTexture (QString textureName) |
Set the texture to use for this WObject when rendered. | |
void | setUseColorTextureOfOwner (bool b) |
set if the object will be rendered with the color and texture of our owner (if we have one) | |
QString | texture () const |
Return the texture name. | |
bool | useColorTextureOfOwner () const |
if true, we will use color and texture of our owner (if we have one) | |
World * | world () |
Return the world. | |
const World * | world () const |
Return the world (const version) | |
Public Member Functions inherited from Ownable | |
Ownable () | |
Constructor. | |
virtual | ~Ownable () |
Destructor. | |
const QList< Owned > & | owned () const |
Returns the list of objects owned by this one. | |
Ownable * | owner () const |
Returns the owner of this object. | |
void | setOwner (Ownable *owner, bool destroy=true) |
Sets the owner of this object. | |
Additional Inherited Members | |
Public Types inherited from Ownable | |
typedef QList< Owned > | OwnedList |
The type for the list of owned objects. | |
Protected Member Functions inherited from YarpObject | |
void | registerServerControlBoard (yarp::dev::DeviceDriver *device, QString devicename) |
Add a DeviceDriver to the map of controllers It automatically construct a ServerControlBoard, the port name for accessing the DeviceDriver will be /worldname/yarpobjectname/devicename. | |
void | registerServerFrameGrabber (yarp::dev::DeviceDriver *device, QString devicename) |
Add a DeviceDriver to the map of controllers It automatically construct a ServerFrameGrabber, the port name for accessing the DeviceDriver will be /worldname/yarpobjectname/devicename. | |
void | removeServerControlBoard (QString devicename) |
Remove, and close the serverControlBoard registered and opened by above call. | |
Protected Attributes inherited from WObject | |
QColor | colorv |
Color, it contains also alpha channel. | |
bool | invisible |
if TRUE it will not renderized | |
QString | namev |
Name of the WObject. | |
QString | texturev |
Texture name. | |
wMatrix | tm |
Trasformation matrix. | |
bool | usecolortextureofowner |
if true, we will use color and texture of our owner (if we have one). | |
World * | worldv |
World. | |
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::setColor(), 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
|
inline |
|
inline |
Returns the YARP frame grabber object.
Definition at line 145 of file wcamera.h.
Referenced by PhyiCub::leftEyeFrameGrabber(), and PhyiCub::rightEyeFrameGrabber().
|
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().
|
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