RenderCamera class. More...
Public Member Functions | |
RenderCamera (WCamera *wcamera, WObject *attachTo, unsigned int width, unsigned int height) | |
void | initializeGL () |
Called by the Constructor. | |
void | moveRotatePointOfView (const wMatrix &tm) |
Setup the modelViewMatrix in order to view from the specified point. | |
void | paintGL () |
Update the content of the RenderCamera. | |
DeviceDriver Interface | |
virtual bool | open (yarp::os::Searchable &config) |
open | |
virtual bool | close () |
close | |
virtual bool | configure (yarp::os::Searchable &config) |
configure | |
IFrameGrabberImage Interface | |
virtual bool | getImage (yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) |
virtual int | height () const |
virtual int | width () const |
Public Member Functions inherited from RenderWObjectContainer | |
RenderWObjectContainer (QString wResName="world") | |
Constructor. | |
virtual | ~RenderWObjectContainer () |
Destructor. | |
bool | addTextureImage (QString filename, QString texturename) |
Add a new texture image associating with it the name specified. | |
void | applyTexture (QGLContext *gw, QString texts) |
Setup only the Texture. | |
void | drawSkyGroundBox (QGLContext *) |
Draw a Sky and a Ground (not static because it uses world dimensions) | |
const QVector< RenderWObject * > | graphics () |
return all RenderWObject presents | |
RenderWObject * | operator[] (const WObject *) |
This operator return the RenderWObject associate with WObject passed. | |
void | setupColorTexture (QGLContext *, RenderWObject *obj) |
Setup the Color and Texture into the OpenGL Context for RenderWObject passed. | |
void | setWorld (World *newworld) |
Set the World to render. | |
QImage | textureImage (QString texture) |
Return the corresponding QImage for the texture name passed. | |
Public Member Functions inherited from ConcurrentResourcesUser | |
void | addUsableResource (QString resource) |
void | addUsableResources (QStringList resources) |
void | declareResource (QString name, T *resource, QString lockBuddy="") |
void | deleteResource (QString name) |
T * | getResource (QString name, bool *resourceExists=NULL) |
bool | hasResource (QString name) const |
void | removeAllUsableResources () |
void | removeUsableResource (QString resource) |
void | removeUsableResources (QStringList resources) |
virtual void | shareResourcesWith (ResourcesUser *buddy) |
void | usableResources (QStringList resources) |
bool | usedResourcesExist (QStringList *nonExistingResources=NULL) const |
Additional Inherited Members | |
Public Types inherited from ConcurrentResourcesUser | |
typedef Resource::ResourceChangeType | ResourceChangeType |
Static Public Member Functions inherited from RenderWObjectContainer | |
static RenderWObject * | createRenderWObjectFor (const WObject *, RenderWObjectContainer *) |
Create a suitable RenderWObject to render the WObject passed. | |
static void | drawCylinder (wVector axis, wVector centre, float len, float radius, QColor c=Qt::green) |
draw a cylinder with aligned with axis given | |
static void | drawCylinder (wVector start, wVector end, float radius, QColor c=Qt::green) |
draw a cylinder from start to end | |
static void | drawCylinder (const wMatrix &mat, float len, float radius, QColor c=Qt::green) |
draw a cylinder | |
static void | drawSphere (wVector pos, real radius) |
draw a sphere in position indicate with radius specified | |
static void | drawTorus (real outRad, real innRad, const wMatrix &mat, real angle=2.0 *PI_GRECO, QColor c=Qt::red) |
draw a Torus | |
static void | drawTorus (wVector axis, wVector centre, real outRad, real innRad, real angle=2.0 *PI_GRECO) |
draw a Torus | |
static void | drawWireBox (wVector dims, wMatrix matrix) |
draw a wireframe Box | |
static void | drawWireBox (wVector min, wVector max, const wMatrix &tm) |
draw a wireframe Box | |
static void | drawWireBox (wVector min, wVector max) |
draw a wireframe Box | |
template<class renderwobject > | |
static void | registerRenderWObjectFor (QString classname) |
template method for register new RenderWObject classes for new WObject | |
Protected Member Functions inherited from RenderWObjectContainer | |
void | addObject (WObject *) |
add an Object | |
void | removeObject (WObject *) |
remove an Object | |
virtual void | resourceChanged (QString name, ResourceChangeType changeType) |
The function called when a resource you use is changed. | |
World * | world () |
return the World. | |
Protected Attributes inherited from RenderWObjectContainer | |
QMutex | mutex |
The mutex protecting accesses to members of this class. | |
Detailed Description
Member Function Documentation
|
virtual |
close
Definition at line 141 of file wcamera.cpp.
|
virtual |
configure
Definition at line 145 of file wcamera.cpp.
void initializeGL | ( | ) |
Called by the Constructor.
Definition at line 81 of file wcamera.cpp.
void moveRotatePointOfView | ( | const wMatrix & | tm | ) |
Setup the modelViewMatrix in order to view from the specified point.
Definition at line 70 of file wcamera.cpp.
References RenderWObjectContainer::mutex, and wVectorT< Shared >::scale().
Referenced by RenderCamera::paintGL().
|
virtual |
open
Definition at line 137 of file wcamera.cpp.
void paintGL | ( | ) |
Update the content of the RenderCamera.
Definition at line 96 of file wcamera.cpp.
References RenderWObjectContainer::drawSkyGroundBox(), RenderWObjectContainer::graphics(), WObject::isInvisible(), RenderCamera::moveRotatePointOfView(), RenderWObjectContainer::mutex, RenderWObject::object(), and Ownable::owner().
Referenced by WCamera::postUpdate().
The documentation for this class was generated from the following files:
- worldsim/include/wcamera.h
- worldsim/src/wcamera.cpp