HeadBall  1.0
A game
Public Member Functions | Private Attributes | List of all members
HeadBall::Ground Class Reference

Class for defining the ground in the game world. More...

#include <Ground.hpp>

Collaboration diagram for HeadBall::Ground:
Collaboration graph

Public Member Functions

 Ground (GameDataRef data, WorldRef world)
 Construct a new Ground object. More...
 
void init ()
 Initiate the Ground Object. More...
 
sf::RectangleShape shape ()
 Return the shape of the Ground object. More...
 

Private Attributes

GameDataRef _data
 The Shared Pointer of the game data. More...
 
WorldRef _world
 The Shared Pointer of Box2D World. More...
 
sf::RectangleShape _shape
 The SFML shape of the ground. More...
 
b2BodyDef _bodyDef
 The Definition of Box2D body. More...
 
b2Body * _body
 The Box2D body of ground. More...
 
b2PolygonShape _polyShape
 The polygon shape for fixture definition. More...
 
b2FixtureDef _fixture
 The fixture of ground for defining its properties. More...
 

Detailed Description

Class for defining the ground in the game world.

Constructor & Destructor Documentation

◆ Ground()

HeadBall::Ground::Ground ( GameDataRef  data,
WorldRef  world 
)

Construct a new Ground object.

Parameters
dataThe Shared Pointer for game data
worldThe Shared pointer for Box2D world

Member Function Documentation

◆ init()

void HeadBall::Ground::init ( )

Initiate the Ground Object.

◆ shape()

sf::RectangleShape HeadBall::Ground::shape ( )

Return the shape of the Ground object.

Returns
sf::RectangleShape Shape of Ground Object

Member Data Documentation

◆ _body

b2Body* HeadBall::Ground::_body
private

The Box2D body of ground.

◆ _bodyDef

b2BodyDef HeadBall::Ground::_bodyDef
private

The Definition of Box2D body.

◆ _data

GameDataRef HeadBall::Ground::_data
private

The Shared Pointer of the game data.

◆ _fixture

b2FixtureDef HeadBall::Ground::_fixture
private

The fixture of ground for defining its properties.

◆ _polyShape

b2PolygonShape HeadBall::Ground::_polyShape
private

The polygon shape for fixture definition.

◆ _shape

sf::RectangleShape HeadBall::Ground::_shape
private

The SFML shape of the ground.

◆ _world

WorldRef HeadBall::Ground::_world
private

The Shared Pointer of Box2D World.


The documentation for this class was generated from the following files: