Army ant simulation
Ramp.h
Go to the documentation of this file.
1 
11 //TODO: implement the possibility to change the ramp angle
12 
13 #ifndef RAMP_H_
14 #define RAMP_H_
15 
16 #include "Terrain.h"
17 
18 class Ramp: public Terrain{
19 public:
20  Ramp();
21  Ramp(b2World* world, sf::RenderWindow& window, config::sTerrain terrainParam, int WINDOW_X_PX, double bodyLength=1); // If want to define the dimension relatively to the body length
22  virtual ~Ramp();
23 
24  /*Default terrain is linear ground of width 2*m_runaway located at m_posY from the top of the window*/
32  void create(b2World* world, sf::RenderWindow& window, config::sTerrain terrainParam, int WINDOW_X_PX, double bodyLength=1);
33 
38  void createBody(b2World* world);
39 
44  void drawBody(sf::RenderWindow& window);
45 
48 
50  b2Vec2 getTopLeftCorner();
52  b2Vec2 getTopRightCorner();
54  b2Vec2 getBottom();
55 //
56 // double getVLength();
57 };
58 
59 #endif /* RAMP_H_ */
void createBody(b2World *world)
Definition: Ramp.cpp:30
b2Vec2 getTopLeftCorner()
Definition: Ramp.cpp:73
b2Vec2 getBottom()
Definition: Ramp.cpp:81
Implementation of the Terrain class.
void create(b2World *world, sf::RenderWindow &window, config::sTerrain terrainParam, int WINDOW_X_PX, double bodyLength=1)
Definition: Ramp.cpp:24
b2Vec2 getTopRightCorner()
Definition: Ramp.cpp:77
e_terrain_type
Definition: Terrain.h:23
void drawBody(sf::RenderWindow &window)
Definition: Ramp.cpp:56
Definition: Ramp.h:18
e_terrain_type getType()
Definition: Ramp.cpp:85