Box2D Getting Started
Chapter 5 of Ian Parberry's "Introduction to Game Physics with Box2D"
 All Classes Files Functions Variables Enumerations Pages
Public Member Functions | List of all members
CObjectWorld Class Reference

The object world. More...

#include <objectworld.h>

Public Member Functions

CGameObjectcreate (GameObjectType t)
 Create new object.
 
void SetWorldSize (float width, float height)
 Set Object World dimensions.
 
void GetWorldSize (float &width, float &height)
 Get Object World dimensions.
 
void clear ()
 Clear objects.
 
void move ()
 Move objects.
 
void draw ()
 

Detailed Description

The object world.

Member Function Documentation

CGameObject * CObjectWorld::create ( GameObjectType  t)

Create new object.

Create an object of a specified type, enter it into the object list, and return a pointer to it.

Parameters
tObject type.
Returns
Pointer to the object created.
void CObjectWorld::draw ( )

Draw everything in the Object World. Draw the game objects using Painter's Algorithm.

void CObjectWorld::GetWorldSize ( float &  width,
float &  height 
)

Get Object World dimensions.

Get the Object World's width and height.

Parameters
widthCalling parameter will be set to Object World width.
heightCalling parameter will be set to Object World height.
void CObjectWorld::SetWorldSize ( float  width,
float  height 
)

Set Object World dimensions.

Set the Object World's width and height.

Parameters
widthObject World width.
heightObject World height.