![]() |
Box2D Joint Toy
Game Physics with a 2D Physics Engine
|
Game specific defines and enumerated types.
#include "SageDefines.h"#include "Box2D\Box2D.h"

Enumerations | |
| enum class | eGameState { Loading , Playing } |
| Game state enumerated type. More... | |
| enum class | eSprite { WindmillBg , WindmillBase , WindmillFan , GearBg , Gear0 , Gear1 , Gear2 , Gear3 , Gear4 , Gear5 , NautilusBg , NautilusGear , RackAndPinionBg , Pinion , Rack , CarBg , CarBody , CarWheel , Platform , UpRamp , DownRamp , NewtonBg , Ball , Cradle , Rope , Isaac , Eyes , ElephantBg , Crate , Safe , Elephant , Pulley , Line , None } |
| Sprite enumerated type. More... | |
| enum class | eDrawMode { Sprites , Both , Lines , Wrap } |
| Draw mode enumerated type. More... | |
| enum class | eLevel { Windmill , Gears , Nautilus , RackPinion , CarBridge , Newton , Pulley , Size } |
| Level enumerated type. More... | |
Functions | |
| float | PW2RW (float x) |
| Physics World to Render World units for a float. Physics World to Render World units for a float. | |
| Vector2 | PW2RW (const b2Vec2 &v) |
| Physics World to Render World units for a 2D vector. Physics World to Render World units for a 2D vector. | |
| float | RW2PW (float x) |
| Render World to Physics World units for a float. Render World to Physics World units for a float. | |
| float | RW2PW (int x) |
| Render World to Physics World units for an int. Render World to Physics World units for an integer. | |
| b2Vec2 | RW2PW (int x, int y) |
| Render World to Physics World units for a pair of integers. Render World to Physics World units for a 2D vector provided as a pair of integers. | |
| b2Vec2 | RW2PW (const Vector2 &v) |
| Physics World to Render World units for a vector. | |
Variables | |
| const float | fPRV = 10.0f |
| Physics World to Render World rescale value. | |
|
strong |
An enumerated type for the drawing mode.
|
strong |
An enumerated type for the game state.
|
strong |
Enumerated type for the level. Size must be last.
|
strong |
An enumerated type for the sprites, which will be cast to an unsigned integer and used for the index of the corresponding texture in graphics memory.
|
inline |
| v | A 2D vector in Physics World units. |
|
inline |
| x | A floating point value in Physics World units. |

|
inline |
| v | A 2D vector in Render World units. |
|
inline |
| x | A floating point value in Render World units. |

|
inline |
| x | An integer value in Render World units. |
|
inline |
| x | An integer value in Render World units. |
| y | An integer value in Render World units. |