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

Sir Isaac Newton. More...

#include <Isaac.h>

Inheritance diagram for CSirIsaacNewton:
CCommon

Public Member Functions

 CSirIsaacNewton ()
 Constructor.
 
void draw ()
 Draw. More...
 
void step (const Vector2 &)
 Animation step. More...
 

Private Attributes

Vector2 m_vFacePos
 Face position.
 
Vector2 m_vEyePos
 Neutral eye position.
 
Vector2 m_vEyeOffset
 Eye offset from neutral position.
 

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

Sir Isaac Newton.

Sir Isaac Newton will swivel his eyes in a desired direction.

Member Function Documentation

◆ draw()

void CSirIsaacNewton::draw ( )

Draw.

Draw Sir Isaac with his eyeballs drawn before his face so that everything looks right.

◆ step()

void CSirIsaacNewton::step ( const Vector2 &  v)

Animation step.

Set the eye offset in a particular direction.

Parameters
vLook-at point.