The subclass of PhyObject2DWrapper wrapping a cylinder. More...

Public Member Functions | |
virtual void | computeLinearViewFieldOccupiedRange (const wMatrix &cameraMtr, double &minAngle, double &maxAngle, double &distance) const |
Computes the portion of a linear the view field occupied by this object. | |
virtual PhyCylinder * | phyObject () |
Returns a pointer to the wrapper PhyObject. | |
virtual const PhyCylinder * | phyObject () const |
Returns a pointer to the wrapper PhyObject (const version) | |
virtual void | setPosition (real x, real y) |
Sets the position of the object in the plane. | |
virtual void | setStatic (bool s) |
Sets whether the object is static or not. | |
virtual Type | type () const |
Returns the type of this wrapped object. | |
![]() | |
QColor | color () const |
Returns the color to use when rendering this. | |
bool | getStatic () const |
Returns true if the object is static. | |
wVector | position () const |
Returns the position of the object. | |
void | setColor (QColor color) |
Sets the color to use when rendering this. | |
void | setPosition (wVector pos) |
Sets the position of the object in the plane. | |
void | setTexture (QString textureName) |
Set the texture to use when rendering this. | |
void | setUseColorTextureOfOwner (bool b) |
Sets whether this will be rendered with the color and texture of our owner (if we have one) | |
QString | texture () const |
Returns the name of the texture. | |
bool | useColorTextureOfOwner () const |
Returns whether this will be rendered with the color and texture of the owner (if we have one) | |
Protected Member Functions | |
Cylinder2DWrapper (PhyCylinder *cylinder, Type type) | |
Constructor. | |
~Cylinder2DWrapper () | |
Destructor. | |
![]() | |
PhyObject2DWrapper () | |
Constructor. | |
virtual | ~PhyObject2DWrapper () |
Destructor. | |
Friends | |
class | Arena |
The Arena class is friend to be able to instantiate and delete this class. | |
Additional Inherited Members | |
![]() | |
enum | Type { Plane = 0, Wall, Box, RectangularTargetArea, Cylinder, SmallCylinder, BigCylinder, CircularTargetArea, NumberOfDifferentTypes } |
The possible type of wrapped objects. More... | |
Detailed Description
The subclass of PhyObject2DWrapper wrapping a cylinder.
Definition at line 386 of file wheeledexperimenthelper.h.
Constructor & Destructor Documentation
|
protected |
Constructor.
- Parameters
-
cylinder the cylinder to wrap type the type of cylinder. This can only be one of Cylinder, SmallCylinder, BigCylinder or CircularTargetArea. If the type is CircularTargetArea, this cannot be made non-static
Definition at line 317 of file wheeledexperimenthelper.cpp.
References PhyCylinder::setStatic().
|
protected |
Destructor.
Definition at line 327 of file wheeledexperimenthelper.cpp.
Member Function Documentation
|
virtual |
Computes the portion of a linear the view field occupied by this object.
This function returns the angular range occupied by this object on a linear camera described by the given matrix. The Z axis of the matrix is the upvector, the camera lies on the XY plane and points towars the X axis (i.e. angles start from the X axis). If the object is not visible by the camera, this function returns a negative distance. The min angle can be greater than the max angle if the object is behind the camera. Here we make the assumption that the camera is outside the wall (otherwise the algorithm gives wrong results). The matrix representing the camera is translated so that it is on the same plane as the vertexes of the wall before doing computations
- Parameters
-
cameraMtr the matrix describing the camera (see function description) minAngle this is set to the minimum angle of the view field occupied by the object maxAngle this is set to the maximum angle of the view field occupied by the object distance this is set to the distance of the object from the camera. It is negative if the object is not visible by the camera
Implements PhyObject2DWrapper.
Definition at line 367 of file wheeledexperimenthelper.cpp.
References PhyCylinder::height(), PhyCylinder::matrix(), wVectorT< Shared >::norm(), PhyCylinder::radius(), wVectorT< Shared >::scale(), wMatrix::w_pos, wMatrix::x_ax, wVectorT< Shared >::z, and wMatrix::z_ax.
|
virtual |
Returns a pointer to the wrapper PhyObject.
You should avoid changing the PhyObject directly, use the methods of this class, instead
- Returns
- a pointer to the wrapper PhyObject
Implements PhyObject2DWrapper.
Definition at line 332 of file wheeledexperimenthelper.cpp.
Referenced by Arena::createCircularTargetArea(), Cylinder2DWrapper::setPosition(), and Cylinder2DWrapper::setStatic().
|
virtual |
Returns a pointer to the wrapper PhyObject (const version)
- Returns
- a const pointer to the wrapper PhyObject
Implements PhyObject2DWrapper.
Definition at line 337 of file wheeledexperimenthelper.cpp.
|
virtual |
Sets the position of the object in the plane.
- Parameters
-
x the new x coordinate y the new y coordinate
Implements PhyObject2DWrapper.
Definition at line 357 of file wheeledexperimenthelper.cpp.
References PhyCylinder::matrix(), Cylinder2DWrapper::phyObject(), PhyCylinder::setPosition(), wMatrix::w_pos, and wVectorT< Shared >::x.
|
virtual |
Sets whether the object is static or not.
Whether this can be made static or not depends on the type of cylinder
- Parameters
-
s if true the object will be static
Reimplemented from PhyObject2DWrapper.
Definition at line 342 of file wheeledexperimenthelper.cpp.
References Cylinder2DWrapper::phyObject(), and PhyCylinder::setStatic().
|
virtual |
Returns the type of this wrapped object.
- Returns
- the type of this wrapped object
Implements PhyObject2DWrapper.
Definition at line 352 of file wheeledexperimenthelper.cpp.
Friends And Related Function Documentation
|
friend |
The Arena class is friend to be able to instantiate and delete this class.
Definition at line 491 of file wheeledexperimenthelper.h.
The documentation for this class was generated from the following files:
- experiments/include/wheeledexperimenthelper.h
- experiments/src/wheeledexperimenthelper.cpp