HeadBall  1.0
A game
Ground.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Game.hpp"
4 
5 namespace HeadBall {
10  class Ground {
11  public:
18  Ground (GameDataRef data, WorldRef world);
19 
24  void init( );
25 
31  sf::RectangleShape shape ( );
32 
33  private:
36 
37  sf::RectangleShape _shape;
38 
39  b2BodyDef _bodyDef;
40  b2Body* _body;
41  b2PolygonShape _polyShape;
42  b2FixtureDef _fixture;
43  };
44 }
Class for defining the ground in the game world.
Definition: Ground.hpp:10
b2BodyDef _bodyDef
The Definition of Box2D body.
Definition: Ground.hpp:39
GameDataRef _data
The Shared Pointer of the game data.
Definition: Ground.hpp:34
b2FixtureDef _fixture
The fixture of ground for defining its properties.
Definition: Ground.hpp:42
sf::RectangleShape shape()
Return the shape of the Ground object.
Definition: Ground.cpp:25
b2Body * _body
The Box2D body of ground.
Definition: Ground.hpp:40
Ground(GameDataRef data, WorldRef world)
Construct a new Ground object.
Definition: Ground.cpp:6
b2PolygonShape _polyShape
The polygon shape for fixture definition.
Definition: Ground.hpp:41
sf::RectangleShape _shape
The SFML shape of the ground.
Definition: Ground.hpp:37
WorldRef _world
The Shared Pointer of Box2D World.
Definition: Ground.hpp:35
void init()
Initiate the Ground Object.
Definition: Ground.cpp:8
Custom namespace used throughout the project.
Definition: AboutState.cpp:6
std::shared_ptr< b2World > WorldRef
The Shared Pointer that points to the Box2D world.
Definition: Game.hpp:51
std::shared_ptr< GameData > GameDataRef
The Shared Pointer of GameData Struct.
Definition: Game.hpp:39