Army ant simulation
Vterrain.h
Go to the documentation of this file.
1 
12 #ifndef VTERRAIN_H_
13 #define VTERRAIN_H_
14 
15 #include "Terrain.h"
16 
17 class Vterrain: public Terrain {
18 public:
19  Vterrain();
20  Vterrain(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
21  virtual ~Vterrain();
22 
23  /*Default terrain is linear ground of width 2*m_runaway located at m_posY from the top of the window*/
31  void create(b2World* world, sf::RenderWindow& window, config::sTerrain terrainParam, int WINDOW_X_PX, double bodyLength=1);
36  void createBody(b2World* world);
37 
42  void drawBody(sf::RenderWindow& window);
43 
46 
48  b2Vec2 getTopLeftCorner();
50  b2Vec2 getTopRightCorner();
52  b2Vec2 getBottom();
53 
54  double getVLength();
55 
56 };
57 
58 #endif /* VTERRAIN_H_ */
void create(b2World *world, sf::RenderWindow &window, config::sTerrain terrainParam, int WINDOW_X_PX, double bodyLength=1)
Definition: Vterrain.cpp:25
void createBody(b2World *world)
Definition: Vterrain.cpp:31
Implementation of the Terrain class.
b2Vec2 getBottom()
Definition: Vterrain.cpp:121
void drawBody(sf::RenderWindow &window)
Definition: Vterrain.cpp:89
b2Vec2 getTopRightCorner()
Definition: Vterrain.cpp:117
e_terrain_type
Definition: Terrain.h:23
e_terrain_type getType()
Definition: Vterrain.cpp:131
b2Vec2 getTopLeftCorner()
Definition: Vterrain.cpp:113