Box2D Getting Started
Chapter 5 of Ian Parberry's "Introduction to Game Physics with Box2D"
|
The object world. More...
#include <objectworld.h>
Public Member Functions | |
CGameObject * | create (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 () |
The object world.
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.
t | Object type. |
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.
width | Calling parameter will be set to Object World width. |
height | Calling 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.
width | Object World width. |
height | Object World height. |