27 #include "parametersettable.h"
28 #include "resourcesuser.h"
30 #include "wheeledexperimenthelper.h"
31 #include "baseexception.h"
56 enum KinematicCollisionHandlers {
64 UnknownCollisionHandler
76 static KinematicCollisionHandlers stringToCollisionHandler(QString str);
85 static QString collisionHandlerToString(KinematicCollisionHandlers h);
129 static void describe(QString type);
136 const QVector<PhyObject2DWrapper*>& getObjects()
const
138 return m_objects2DList;
158 return m_plane->phyObject()->sideX();
168 return m_plane->phyObject()->sideY();
179 void addRobots(QStringList robots);
222 Box2DWrapper* createWall(QColor color, wVector start, wVector end,
real thickness,
real height = -1.0);
320 void prepareToHandleKinematicRobotCollisions();
330 void handleKinematicRobotCollisions();
344 FARSA_DEPRECATED QVector<PhyObject2DWrapper*> getKinematicRobotCollisions(
WheeledRobot2DWrapper* robot)
const;
359 FARSA_DEPRECATED QVector<PhyObject2DWrapper*> getKinematicRobotCollisions(QString robotResourceName)
const;
384 QSet<PhyObject2DWrapper*> getKinematicRobotCollisionsSet(QString robotResourceName)
const;
429 virtual void resourceChanged(QString resourceName, ResourceChangeType changeType);
435 void simpleCollisionsPreAdvance();
441 void simpleCollisionsHandle();
447 void circleCollisionsPreAdvance();
453 void circleCollisionsHandle();
466 const real m_smallCylinderRadius;
474 const real m_bigCylinderRadius;
481 const real m_lightBulbRadius;
486 const KinematicCollisionHandlers m_collisionHandler;
491 QVector<PhyObject2DWrapper*> m_objects2DList;
503 QMap<QString, WheeledRobot2DWrapper*> m_robotResourceWrappers;
511 QMap<WheeledRobot2DWrapper*, QSet<PhyObject2DWrapper*> > m_kinematicRobotCollisions;
543 #if defined(_MSC_VER)
544 #pragma warning(push)
545 #pragma warning(disable:4996)
564 strncpy(m_reason, reason, 256);
565 m_reason[255] =
'\0';
566 sprintf(m_errorMessage,
"Runtime error in the Arena, reason: %s", m_reason);
567 m_errorMessage[511] =
'\0';
578 strncpy(m_reason, other.m_reason, 256);
579 m_reason[255] =
'\0';
580 strncpy(m_errorMessage, other.m_errorMessage, 512);
581 m_errorMessage[511] =
'\0';
591 if (&other ==
this) {
595 BaseException::operator=(other);
596 strncpy(m_reason, other.m_reason, 256);
597 m_reason[255] =
'\0';
598 strncpy(m_errorMessage, other.m_errorMessage, 512);
599 m_errorMessage[511] =
'\0';
616 virtual const char *what()
const throw()
618 return m_errorMessage;
626 const char *reason()
const throw()
646 char m_errorMessage[512];
650 #if defined(_MSC_VER)