Commit bcdc501a authored by root's avatar root
Browse files

Merge branch 'master' of /srv/git/hook_robotique/../repositories/gitRobotique

parents f3dc9b09 3af3d906
......@@ -24,7 +24,7 @@ void eteindreLED2();
bool isLedOn(int led);
#endif
class Led
class Leds
{
public:
static void toggle(int index = 0);
......
......@@ -19,7 +19,8 @@ class Objet
ANY,
SHELL, /*!< Représente un coquillage*/
SANDCUBE, /*!< Représente un cube de chateau de sable*/
SANDCUBE,
SANDCUBE1,/*!< Représente un cube de chateau de sable*/
/* SANDCONE, /*!< Représente un cone de chateau de sable*/
SANDCYLINDER, /*!< Représente un cylinder de chateau de sable*/
PORTE /*!< Représente la porte des cabine de plage*/
......
......@@ -47,7 +47,7 @@ void Clock::every100ms()
void Clock::everySecond()
{
Led::toggle(0);
}
Clock* Clock::getInstance()
......
......@@ -84,6 +84,10 @@ Objet::Objet(b2World & world, Position p, Type type, Angle theta, QColor color)
radius = 0.58f;
break;
}
case SANDCUBE1:
{
}
case PORTE:
{ b2Vec2 vertices[4];
......@@ -223,6 +227,28 @@ case SANDCYLINDER:
pa.translate(-p.x, -p.y);
break;*/
}
case SANDCUBE1:
{
pa.translate(p.x, p.y);
p_color = QColor(232, 140, 0);
pa.setBrush(p_color);
pa.setPen(p_color);
pa.drawRect(830,0, 58, 58);
pa.drawRect(888,0, 58, 58);
pa.drawRect(830,58, 58, 58);
pa.drawRect(888,58, 58, 58);
p_color = QColor(0, 0, 0);
pa.setBrush(p_color);
pa.setPen(p_color);
pa.drawLine(QPointF(830,0), QPointF(946,0));
pa.drawLine(QPointF(946,0), QPointF(946,116));
pa.drawLine(QPointF(946,116), QPointF(830,116));
pa.drawLine(QPointF(830,116), QPointF(830,0));
pa.drawLine(QPointF(888,0), QPointF(888,116));
pa.drawLine(QPointF(830,58), QPointF(946,58));
pa.translate(-p.x, -p.y);
break;
}
case PORTE:
{
pa.setBrush(p_color);
......
......@@ -158,19 +158,10 @@ void Table::createObjects()
objets.push_back(new Objet(world, Position(2292.,900.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(2350.,900.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(0.,0.), Objet::SANDCUBE1, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(830.,0.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(1225.,0.), Objet::SANDCUBE1, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(888.,0.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(2113.,58.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(2055.,58.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(830.,58.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(888.,58.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(2113.,0.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(2055.,0.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
objets.push_back(new Objet(world, Position(1471.,0.), Objet::SANDCUBE, 0, QColor(232, 140, 0)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment