Box2D Joint Toy
Ian Parberry's "Introduction to Game Physics"
Static Protected Attributes | List of all members
CCommon Class Reference

The common variables class. More...

#include <Common.h>

Inheritance diagram for CCommon:
CCar CGame CGear CLineObject CNautilusGear CNewtonsCradle CObject CObjectManager CPulley CRackAndPinion CRamp CSirIsaacNewton CWindmill

Static Protected Attributes

static b2World * m_pPhysicsWorld = nullptr
 Pointer to Box2D Physics World.
 
static CRendererm_pRenderer = nullptr
 Pointer to the renderer.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to the object manager.
 
static CWindmillm_pWindmill = nullptr
 Pointer to windmill.
 
static CGearm_pGear = nullptr
 Pointer to gear system.
 
static CNautilusGearm_pNautilusGear = nullptr
 Pointer to Nautilus gear system.
 
static CRackAndPinionm_pRackAndPinion = nullptr
 Pointer to rack-and-pinion.
 
static CCarm_pCar = nullptr
 Pointer to car.
 
static CRampm_pRamp = nullptr
 Pointer to ramp.
 
static CNewtonsCradlem_pNewtonsCradle = nullptr
 Pointer to Newton's Cradle.
 
static CPulleym_pPulley = nullptr
 Pointer to pulley system.
 
static eLevel m_eCurLevel = eLevel::Windmill
 Current level.
 

Detailed Description

The common variables class.

CCommon is a singleton class that encapsulates things that are common to different game components, including game state variables. Making it a singleton class means that we can avoid passing its member variables around as parameters, which makes the code minisculely faster, and more importantly, reduces function clutter.