WorldController Class Reference

WorldController class. More...

Inheritance diagram for WorldController:

Public Member Functions

 WorldController (World *world, QString name)
 Constructor.
 
 ~WorldController ()
 Destructor.
 
yarp::os::Port * inPort ()
 return the input Port
 
yarp::os::Port * outPort ()
 return the output Port
 
virtual void update ()
 only when the update is called the commands sended to the WorldController are executed
 
- 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 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.
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 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).
 
Worldworldv
 World.
 

Detailed Description

WorldController class.

\

Motivation
The WorldController class allow to manipulate the World using commands on YARP RPC ports.
Description
Warnings
Only one WorldController for each World is allowed.

Definition at line 106 of file worldcontroller.h.

Constructor & Destructor Documentation

WorldController ( World world,
QString  name 
)

Constructor.

Definition at line 322 of file worldcontroller.cpp.

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

Destructor.

Definition at line 333 of file worldcontroller.cpp.

Member Function Documentation

yarp::os::Port* inPort ( )
inline

return the input Port

Definition at line 116 of file worldcontroller.h.

Referenced by ServerWorldController::run().

yarp::os::Port* outPort ( )
inline

return the output Port

Definition at line 120 of file worldcontroller.h.

Referenced by ServerWorldController::applyQueuedCommands(), and ServerWorldController::run().

void update ( )
virtual

only when the update is called the commands sended to the WorldController are executed

Definition at line 343 of file worldcontroller.cpp.

References ServerWorldController::applyQueuedCommands().


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