The graphical representation of the linear camera. More...

Public Member Functions | |
LinearCameraGraphic (WObject *object, const wMatrix &transformation, double minAngle, double maxAngle, unsigned int numReceptors, QString name="unamed") | |
Constructor. More... | |
~LinearCameraGraphic () | |
Destructor. More... | |
void | setPerceivedColors (const QVector< QColor > &receptors) |
Sets the colors perceived by the camera. More... | |
![]() | |
GraphicalWObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity()) | |
WObject * | attachedObject () const |
void | attachToObject (WObject *object, bool makeOwner=false, const wMatrix &displacement=wMatrix::identity()) |
const wMatrix & | getDisplacement () const |
void | setDisplacement (const wMatrix &displacement) |
void | updateAndCalculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm) |
void | updateAndCalculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint) |
void | updateAndRender (RenderWObject *renderer, QGLContext *gw) |
void | updateAndRenderAABB (RenderWObject *renderer, RenderWorld *gw) |
![]() | |
WObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity(), bool addToWorld=true) | |
QColor | color () const |
void | drawLocalAxes (bool d) |
bool | isInvisible () const |
const QString & | label () const |
const QColor & | labelColor () const |
const wVector & | labelPosition () const |
bool | labelShown () const |
bool | localAxesDrawn () const |
const wMatrix & | matrix () const |
QString | name () const |
virtual void | postUpdate () |
virtual void | preUpdate () |
void | setAlpha (int alpha) |
void | setColor (QColor c) |
void | setInvisible (bool b) |
void | setLabel (QString label) |
void | setLabel (QString label, wVector pos, QColor color) |
void | setLabel (QString label, wVector pos) |
void | setLabelColor (const QColor &color) |
void | setLabelPosition (const wVector &pos) |
void | setMatrix (const wMatrix &newm) |
void | setPosition (real x, real y, real z) |
void | setPosition (const wVector &newpos) |
void | setTexture (QString textureName) |
void | setUseColorTextureOfOwner (bool b) |
void | showLabel (bool show) |
QString | texture () const |
bool | useColorTextureOfOwner () const |
const World * | world () const |
World * | world () |
![]() | |
const QList< Owned > & | owned () const |
Ownable * | owner () const |
void | setOwner (Ownable *owner, bool destroy=true) |
Protected Member Functions | |
virtual void | render (RenderWObject *renderer, QGLContext *gw) |
Performs the actual drawing. More... | |
![]() | |
virtual void | calculateAABB (wVector &minPoint, wVector &maxPoint, const wMatrix tm) |
virtual void | calculateOBB (wVector &dimension, wVector &minPoint, wVector &maxPoint) |
virtual void | renderAABB (RenderWObject *renderer, RenderWorld *gw) |
void | updateMatrixFromAttachedObject () |
![]() | |
virtual void | changedMatrix () |
Protected Attributes | |
const double | m_maxAngle |
The maximum angle of the camera. More... | |
const double | m_minAngle |
The minimum angle of the camera. More... | |
const unsigned int | m_numReceptors |
The number of receptors. More... | |
WObject *const | m_object |
The object to which we are attached. More... | |
const double | m_receptorRange |
The range of each receptor. More... | |
QVector< QColor > | m_receptors |
The vector with perceived colors. More... | |
QMutex | m_receptorsMutex |
The mutex protecting the m_receptors variable. More... | |
![]() | |
QColor | colorv |
bool | invisible |
QColor | labelcol |
bool | labeldrawn |
wVector | labelpos |
QString | labelv |
bool | localFrameOfReferenceDrawn |
QString | namev |
QString | texturev |
wMatrix | tm |
bool | usecolortextureofowner |
World * | worldv |
Additional Inherited Members | |
![]() | |
typedef QList< Owned > | OwnedList |
Detailed Description
The graphical representation of the linear camera.
Definition at line 245 of file sensors.cpp.
Constructor & Destructor Documentation
|
inline |
Constructor.
This also sets the object to be our owner
- Parameters
-
object the object to which we are attached. transformation the transformation matrix relative the one of the object to which we are attached minAngle the minimum angle of the camera maxAngle the maximum angle of the camera numReceptors the number of receptors name the name of this object
Definition at line 261 of file sensors.cpp.
References GraphicalWObject::attachToObject(), LinearCameraGraphic::m_object, WObject::setColor(), WObject::setTexture(), and WObject::setUseColorTextureOfOwner().
|
inline |
Destructor.
Definition at line 282 of file sensors.cpp.
Member Function Documentation
|
inlineprotectedvirtual |
Performs the actual drawing.
- Parameters
-
renderer the RenderWObject object associated with this one. Use it e.g. to access the container gw the OpenGL context
Implements GraphicalWObject.
Definition at line 307 of file sensors.cpp.
References RenderWObject::container(), LinearCameraGraphic::m_minAngle, LinearCameraGraphic::m_numReceptors, LinearCameraGraphic::m_receptorRange, LinearCameraGraphic::m_receptors, LinearCameraGraphic::m_receptorsMutex, RenderWObjectContainer::setupColorTexture(), and WObject::tm.
|
inline |
Sets the colors perceived by the camera.
This function is thread-safe
- Parameters
-
receptors the colors perceived by receptors
Definition at line 292 of file sensors.cpp.
References LinearCameraGraphic::m_receptors, and LinearCameraGraphic::m_receptorsMutex.
Referenced by LinearCamera::update().
Member Data Documentation
|
protected |
The maximum angle of the camera.
Definition at line 459 of file sensors.cpp.
|
protected |
The minimum angle of the camera.
Definition at line 454 of file sensors.cpp.
Referenced by LinearCameraGraphic::render().
|
protected |
The number of receptors.
Definition at line 464 of file sensors.cpp.
Referenced by LinearCameraGraphic::render().
|
protected |
The object to which we are attached.
Definition at line 449 of file sensors.cpp.
Referenced by LinearCameraGraphic::LinearCameraGraphic().
|
protected |
The range of each receptor.
This is computed in the constructor.
Definition at line 471 of file sensors.cpp.
Referenced by LinearCameraGraphic::render().
|
protected |
The vector with perceived colors.
Definition at line 476 of file sensors.cpp.
Referenced by LinearCameraGraphic::render(), and LinearCameraGraphic::setPerceivedColors().
|
protected |
The mutex protecting the m_receptors variable.
The variable could be accessed by multiple threads concurrently, so we protect it with a mutex
Definition at line 484 of file sensors.cpp.
Referenced by LinearCameraGraphic::render(), and LinearCameraGraphic::setPerceivedColors().
The documentation for this class was generated from the following file:
- experiments/src/sensors.cpp