YarpObject class. More...

Inheritance diagram for YarpObject:

Public Member Functions

 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 wMatrixmatrix () const
 return a reference to the transformation matrix
 
QString name () const
 Return the name of this object.
 
virtual void postUpdate ()
 postUpdate the WObject this method is called at each step of the world just after the physic update
 
virtual void preUpdate ()
 preUpdate the WObject this method is called at each step of the world just before the physic update
 
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)
 
Worldworld ()
 Return the world.
 
const Worldworld () 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.
 
Ownableowner () const
 Returns the owner of this object.
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object.
 

Protected Member Functions

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 Member Functions inherited from WObject
virtual void changedMatrix ()
 virtual function called when the transformation matrix change
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 The type for the list of owned objects.
 
- 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).
 
Worldworldv
 World.
 

Detailed Description

YarpObject class.

\

Motivation
This object represent a Yarped Object, and it's a kind of bridge between World and Yarp
Description
Warnings
Warnings

Definition at line 63 of file yarpobject.h.

Constructor & Destructor Documentation

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.

Definition at line 71 of file yarpobject.cpp.

~YarpObject ( )
virtual

Destroy the YarpObject.

Definition at line 76 of file yarpobject.cpp.

Member Function Documentation

yarp::dev::PolyDriver* polydriver ( QString  name)
inline

return the PolyDriver with the given name associated to it

Definition at line 72 of file yarpobject.h.

Referenced by PhyiCub::enableRightArmCartesianController().

void registerServerControlBoard ( yarp::dev::DeviceDriver *  device,
QString  devicename 
)
protected

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.

Definition at line 80 of file yarpobject.cpp.

References WObject::name(), and WObject::world().

Referenced by PhyiCub::PhyiCub().

void registerServerFrameGrabber ( yarp::dev::DeviceDriver *  device,
QString  devicename 
)
protected

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.

Definition at line 101 of file yarpobject.cpp.

References WObject::name(), and WObject::world().

void removeServerControlBoard ( QString  devicename)
protected

Remove, and close the serverControlBoard registered and opened by above call.

Definition at line 91 of file yarpobject.cpp.

References WObject::name(), and WObject::world().

Referenced by PhyiCub::~PhyiCub().


The documentation for this class was generated from the following files: