Ball and Spring 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:
CBody CGame CObjectManager CPoint CSpring CChain CRagdoll CWheel

Static Protected Attributes

static CRendererm_pRenderer = nullptr
 Pointer to the renderer.
 
static CObjectManagerm_pObjectManager = nullptr
 Pointer to the object manager.
 
static eBody m_eCurrentBody = (eBody)0
 Current body type.
 

Detailed Description

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.