Box2D Joint Toy
Ian Parberry's "Introduction to Game Physics"
Public Member Functions | Private Member Functions | List of all members
CRamp Class Reference

Some platforms and ramps. More...

#include <Ramp.h>

Inheritance diagram for CRamp:
CCommon

Public Member Functions

 CRamp (float, float)
 Constructor. More...
 

Private Member Functions

void CreatePlatform (float, float)
 Create a platform. More...
 
void CreateRampDown (float, float)
 Create a down ramp. More...
 
void CreateRampUp (float, float)
 Create an up ramp. More...
 

Additional Inherited Members

- Static Protected Attributes inherited from CCommon
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

Some platforms and ramps.

Three platforms and two ramps intended to be driven on by the car in Level 5.

Constructor & Destructor Documentation

◆ CRamp()

CRamp::CRamp ( float  x,
float  y 
)

Constructor.

Create a platform, a ramp down, a platform, a ramp up, and a platform, form left to right.

Parameters
xX coordinate in Physics World units.
yY coordinate in Physics World units.

Member Function Documentation

◆ CreatePlatform()

void CRamp::CreatePlatform ( float  x,
float  y 
)
private

Create a platform.

Parameters
xX coordinate in Physics World units.
yY coordinate in Physics World units.

◆ CreateRampDown()

void CRamp::CreateRampDown ( float  x,
float  y 
)
private

Create a down ramp.

Parameters
xX coordinate in Physics World units.
yY coordinate in Physics World units.

◆ CreateRampUp()

void CRamp::CreateRampUp ( float  x,
float  y 
)
private

Create an up ramp.

Parameters
xX coordinate in Physics World units.
yY coordinate in Physics World units.