![]()  | 
  
    Box2D Joint Toy
    
   Ian Parberry's "Introduction to Game Physics" 
   | 
 
The common variables class. More...
#include <Common.h>
  
Static Protected Attributes | |
| static b2World * | m_pPhysicsWorld = nullptr | 
| Pointer to Box2D Physics World.  | |
| static CRenderer * | m_pRenderer = nullptr | 
| Pointer to the renderer.  | |
| static CObjectManager * | m_pObjectManager = nullptr | 
| Pointer to the object manager.  | |
| static CWindmill * | m_pWindmill = nullptr | 
| Pointer to windmill.  | |
| static CGear * | m_pGear = nullptr | 
| Pointer to gear system.  | |
| static CNautilusGear * | m_pNautilusGear = nullptr | 
| Pointer to Nautilus gear system.  | |
| static CRackAndPinion * | m_pRackAndPinion = nullptr | 
| Pointer to rack-and-pinion.  | |
| static CCar * | m_pCar = nullptr | 
| Pointer to car.  | |
| static CRamp * | m_pRamp = nullptr | 
| Pointer to ramp.  | |
| static CNewtonsCradle * | m_pNewtonsCradle = nullptr | 
| Pointer to Newton's Cradle.  | |
| static CPulley * | m_pPulley = nullptr | 
| Pointer to pulley system.  | |
| static eLevel | m_eCurLevel = eLevel::Windmill | 
| Current level.  | |
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.