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

Class for invisible wall around the field and above the goalpost. More...

#include <Wall.hpp>

Collaboration diagram for HeadBall::Wall:
Collaboration graph

Public Member Functions

 Wall (GameDataRef data, WorldRef world)
 Construct a new Wall object. More...
 
void init ()
 Initiate the wall object. More...
 

Private Attributes

GameDataRef _data
 The shared pointer for GameData
More...
 
WorldRef _world
 The shared pointer for b2World
More...
 
b2BodyDef _leftDef
 
b2BodyDef _rightDef
 
b2BodyDef _topDef
 
b2BodyDef _lPostDef
 
b2BodyDef _rPostDef
 The definition of Box2d bodies
More...
 
b2Body * _leftBody
 The Box2d body of left wall
More...
 
b2Body * _rightBody
 The Box2d body of right wall
More...
 
b2Body * _topBody
 The Box2D body of top wall
More...
 
b2Body * _leftPost
 The Box2D body of wall for left goal post. More...
 
b2Body * _rightPost
 The Box2D body of wall for right goal post. More...
 
b2PolygonShape _leftShape
 
b2PolygonShape _rightShape
 
b2PolygonShape _topShape
 
b2PolygonShape _lPostShape
 
b2PolygonShape _rPostShape
 The polygon shape for the fixure definition. More...
 
b2FixtureDef _leftFixture
 
b2FixtureDef _rightFixture
 
b2FixtureDef _topFixture
 
b2FixtureDef _lPostFixture
 
b2FixtureDef _rPostFixture
 The fixture of wall for defining its properties. More...
 

Detailed Description

Class for invisible wall around the field and above the goalpost.

Constructor & Destructor Documentation

◆ Wall()

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

Construct a new Wall object.

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

Member Function Documentation

◆ init()

void HeadBall::Wall::init ( )

Initiate the wall object.

Member Data Documentation

◆ _data

GameDataRef HeadBall::Wall::_data
private

The shared pointer for GameData

◆ _leftBody

b2Body* HeadBall::Wall::_leftBody
private

The Box2d body of left wall

◆ _leftDef

b2BodyDef HeadBall::Wall::_leftDef
private

◆ _leftFixture

b2FixtureDef HeadBall::Wall::_leftFixture
private

◆ _leftPost

b2Body* HeadBall::Wall::_leftPost
private

The Box2D body of wall for left goal post.

◆ _leftShape

b2PolygonShape HeadBall::Wall::_leftShape
private

◆ _lPostDef

b2BodyDef HeadBall::Wall::_lPostDef
private

◆ _lPostFixture

b2FixtureDef HeadBall::Wall::_lPostFixture
private

◆ _lPostShape

b2PolygonShape HeadBall::Wall::_lPostShape
private

◆ _rightBody

b2Body* HeadBall::Wall::_rightBody
private

The Box2d body of right wall

◆ _rightDef

b2BodyDef HeadBall::Wall::_rightDef
private

◆ _rightFixture

b2FixtureDef HeadBall::Wall::_rightFixture
private

◆ _rightPost

b2Body* HeadBall::Wall::_rightPost
private

The Box2D body of wall for right goal post.

◆ _rightShape

b2PolygonShape HeadBall::Wall::_rightShape
private

◆ _rPostDef

b2BodyDef HeadBall::Wall::_rPostDef
private

The definition of Box2d bodies

◆ _rPostFixture

b2FixtureDef HeadBall::Wall::_rPostFixture
private

The fixture of wall for defining its properties.

◆ _rPostShape

b2PolygonShape HeadBall::Wall::_rPostShape
private

The polygon shape for the fixure definition.

◆ _topBody

b2Body* HeadBall::Wall::_topBody
private

The Box2D body of top wall

◆ _topDef

b2BodyDef HeadBall::Wall::_topDef
private

◆ _topFixture

b2FixtureDef HeadBall::Wall::_topFixture
private

◆ _topShape

b2PolygonShape HeadBall::Wall::_topShape
private

◆ _world

WorldRef HeadBall::Wall::_world
private

The shared pointer for b2World


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