Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Platformer Class Reference
Inheritance diagram for Platformer:
Inheritance graph
[legend]

Public Types

enum  State { e_unknown, e_above, e_below }
 

Public Member Functions

 Platformer ()
 
void PreSolve (b2Contact *contact, const b2Manifold *oldManifold) override
 
void Step (Settings &settings) override
 
- Public Member Functions inherited from Test
virtual void BeginContact (b2Contact *contact) override
 Called when two fixtures begin to touch. More...
 
void CompleteBombSpawn (const b2Vec2 &p)
 
void DrawTitle (const char *string)
 
virtual void EndContact (b2Contact *contact) override
 Called when two fixtures cease to touch. More...
 
virtual void JointDestroyed (b2Joint *joint)
 
virtual void Keyboard (int key)
 
virtual void KeyboardUp (int key)
 
void LaunchBomb ()
 
void LaunchBomb (const b2Vec2 &position, const b2Vec2 &velocity)
 
virtual void MouseDown (const b2Vec2 &p)
 
virtual void MouseMove (const b2Vec2 &p)
 
virtual void MouseUp (const b2Vec2 &p)
 
virtual void PostSolve (b2Contact *contact, const b2ContactImpulse *impulse) override
 
void ShiftMouseDown (const b2Vec2 &p)
 
void ShiftOrigin (const b2Vec2 &newOrigin)
 
void SpawnBomb (const b2Vec2 &worldPt)
 
 Test ()
 
virtual void UpdateUI ()
 
virtual ~Test ()
 
- Public Member Functions inherited from b2ContactListener
virtual ~b2ContactListener ()
 

Static Public Member Functions

static TestCreate ()
 

Public Attributes

float m_bottom
 
b2Fixturem_character
 
b2Fixturem_platform
 
float m_radius
 
State m_state
 
float m_top
 

Additional Inherited Members

- Protected Attributes inherited from Test
b2Bodym_bomb
 
bool m_bombSpawning
 
b2Vec2 m_bombSpawnPoint
 
DestructionListener m_destructionListener
 
b2Bodym_groundBody
 
b2Profile m_maxProfile
 
b2MouseJointm_mouseJoint
 
b2Vec2 m_mouseWorld
 
int32 m_pointCount
 
ContactPoint m_points [k_maxContactPoints]
 
int32 m_stepCount
 
int32 m_textIncrement
 
int32 m_textLine
 
b2Profile m_totalProfile
 
b2Worldm_world
 
b2AABB m_worldAABB
 

Detailed Description

Definition at line 25 of file platformer.cpp.

Member Enumeration Documentation

◆ State

Enumerator
e_unknown 
e_above 
e_below 

Definition at line 29 of file platformer.cpp.

Constructor & Destructor Documentation

◆ Platformer()

Platformer::Platformer ( )
inline

Definition at line 36 of file platformer.cpp.

Member Function Documentation

◆ Create()

static Test* Platformer::Create ( )
inlinestatic

Definition at line 122 of file platformer.cpp.

◆ PreSolve()

void Platformer::PreSolve ( b2Contact contact,
const b2Manifold oldManifold 
)
inlineoverridevirtual

This is called after a contact is updated. This allows you to inspect a contact before it goes to the solver. If you are careful, you can modify the contact manifold (e.g. disable contact). A copy of the old manifold is provided so that you can detect changes. Note: this is called only for awake bodies. Note: this is called even when the number of contact points is zero. Note: this is not called for sensors. Note: if you set the number of contact points to zero, you will not get an EndContact callback. However, you may get a BeginContact callback the next step.

Reimplemented from Test.

Definition at line 80 of file platformer.cpp.

◆ Step()

void Platformer::Step ( Settings settings)
inlineoverridevirtual

Reimplemented from Test.

Definition at line 113 of file platformer.cpp.

Member Data Documentation

◆ m_bottom

float Platformer::m_bottom

Definition at line 127 of file platformer.cpp.

◆ m_character

b2Fixture* Platformer::m_character

Definition at line 130 of file platformer.cpp.

◆ m_platform

b2Fixture* Platformer::m_platform

Definition at line 129 of file platformer.cpp.

◆ m_radius

float Platformer::m_radius

Definition at line 127 of file platformer.cpp.

◆ m_state

State Platformer::m_state

Definition at line 128 of file platformer.cpp.

◆ m_top

float Platformer::m_top

Definition at line 127 of file platformer.cpp.


The documentation for this class was generated from the following file:


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:23