![]() |
Box2D Joint Toy
Game Physics with a 2D Physics Engine
|
Stub class for a level. More...
#include <Level.h>


Public Member Functions | |
| CLevel (eSprite) | |
| virtual | ~CLevel () |
| Default constructor. | |
| virtual void | Move () |
| Destructor. | |
| virtual void | Draw () |
| Draw objects in level. | |
| virtual void | Action () |
| Perform action for level. | |
Protected Member Functions | |
| CLineObject * | CreateLine (b2Body *, const b2Vec2 &, bool, b2Body *, const b2Vec2 &, bool) |
| Create new line object. | |
Protected Attributes | |
| std::vector< CObject * > | m_stdObject |
| Object pointers. | |
| std::vector< CLineObject * > | m_stdLine |
| Line list. | |
| eSprite | m_eBgSprite |
| Type of background sprite. | |
Additional Inherited Members | |
Static Protected Attributes inherited from CCommon | |
| static b2World * | m_pPhysicsWorld = nullptr |
| Pointer to Box2D Physics World. | |
| static CBox2DRenderer * | m_pRenderer = nullptr |
| Pointer to the renderer. | |
| static CLevel * | m_pLevel = nullptr |
| Pointer to current level. | |
| static eLevel | m_eCurLevel = eLevel::Windmill |
| Current level. | |
| static eDrawMode | m_eDrawMode = eDrawMode::Sprites |
| Draw mode. | |
The levels in this toy will be derived from this class.
| CLevel::CLevel | ( | eSprite | eBgSprite | ) |
Constructor.
| eBgSprite | Background sprite type. |
|
virtual |
Destructor.
|
virtual |
Perform action for level. This function is a stub.
Reimplemented in CCarAndBridge, CGear, CNautilusGear, CNewtonsCradle, CPulley, CRackAndPinion, and CWindmill.

|
protected |
Create a line object. Lines have their own list do that they can be drawn behind the other objects.
| b0 | Pointer to first physics body. (The base.) |
| d0 | Vector offset to anchor point on b0. |
| r0 | Radius of b0. |
| b1 | Pointer to second physics body. (The dangly bit.) |
| d1 | Vector offset to anchor point on b1. |
| r1 | Radius of b1. |

|
virtual |
Reimplemented in CNewtonsCradle.


|
virtual |
Move for any non-Box2D animations. This function is a stub.
Move for any non-Box2D animations.
Reimplemented in CCarAndBridge, CNautilusGear, CNewtonsCradle, CPulley, and CRackAndPinion.
