23 #ifndef WHEELEDEXPERIMENTHELPER_H
24 #define WHEELEDEXPERIMENTHELPER_H
27 #include "parametersettable.h"
28 #include "resourcesuser.h"
31 #include "phyobject.h"
33 #include "phycylinder.h"
40 class WheeledRobot2DWrapper;
60 RectangularTargetArea,
66 NumberOfDifferentTypes
86 virtual const WObject* wObject()
const;
105 virtual const PhyObject* phyObject()
const = 0;
113 virtual Type type()
const = 0;
123 virtual void setStatic(
bool s);
133 bool getStatic()
const;
141 void setPosition(wVector pos);
150 virtual void setPosition(real x, real y) = 0;
157 wVector position()
const;
180 virtual void computeLinearViewFieldOccupiedRange(
const wMatrix& mtr,
double& minAngle,
double& maxAngle,
double& distance)
const = 0;
196 virtual bool computeDistanceAndOrientationFromRobot(
const WheeledRobot2DWrapper& robot,
double& distance,
double& angle)
const = 0;
203 void setTexture(QString textureName);
210 QString texture()
const;
217 void setColor(QColor color);
224 QColor color()
const;
233 void setUseColorTextureOfOwner(
bool b);
242 bool useColorTextureOfOwner()
const;
297 virtual PhyBox* phyObject();
304 virtual const PhyBox* phyObject()
const;
311 virtual Type type()
const;
319 virtual void setStatic(
bool s);
328 virtual void setPosition(real x, real y);
354 virtual void computeLinearViewFieldOccupiedRange(
const wMatrix& cameraMtr,
double& minAngle,
double& maxAngle,
double& distance)
const;
370 virtual bool computeDistanceAndOrientationFromRobot(
const WheeledRobot2DWrapper& robot,
double& distance,
double& angle)
const;
380 const wVector& vertex(
int i)
const
382 return m_vertexes[i];
392 const wVector& centerOnPlane()
const
394 return m_centerOnPlane;
427 QVector<wVector> m_vertexes;
434 wVector m_centerOnPlane;
481 virtual void setStatic(
bool s);
488 virtual Type type()
const;
496 virtual void setPosition(real x, real y);
522 virtual void computeLinearViewFieldOccupiedRange(
const wMatrix& cameraMtr,
double& minAngle,
double& maxAngle,
double& distance)
const;
538 virtual bool computeDistanceAndOrientationFromRobot(
const WheeledRobot2DWrapper& robot,
double& distance,
double& angle)
const;
618 virtual const WObject* wObject()
const;
634 virtual const PhyObject* phyObject()
const;
641 virtual Type type()
const;
649 virtual void setPosition(real x, real y);
675 virtual void computeLinearViewFieldOccupiedRange(
const wMatrix& cameraMtr,
double& minAngle,
double& maxAngle,
double& distance)
const;
691 virtual bool computeDistanceAndOrientationFromRobot(
const WheeledRobot2DWrapper& robot,
double& distance,
double& angle)
const;
698 double getHeight()
const
708 double getRadius()
const
718 void storePreviousMatrix()
720 m_previousMatrix = wObject()->
matrix();
730 return m_previousMatrix;
758 const double m_height;
763 const double m_radius;
792 wVector FARSA_EXPERIMENTS_API positionOnPlane(
const Box2DWrapper* plane, real x, real y);
809 void FARSA_EXPERIMENTS_API orientationOnPlane(
const Box2DWrapper* plane, real angle,
wMatrix& mtr);
822 real FARSA_EXPERIMENTS_API angleBetweenXAxes(
const wMatrix& mtr1,
const wMatrix& mtr2);