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

Public Types

enum  { e_count = 7 }
 

Public Member Functions

void Break ()
 
 Breakable ()
 
void PostSolve (b2Contact *contact, const b2ContactImpulse *impulse) 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 PreSolve (b2Contact *contact, const b2Manifold *oldManifold) 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_angularVelocity
 
b2Bodym_body1
 
bool m_break
 
bool m_broke
 
b2Fixturem_piece1
 
b2Fixturem_piece2
 
b2PolygonShape m_shape1
 
b2PolygonShape m_shape2
 
b2Vec2 m_velocity
 

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 26 of file breakable.cpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
e_count 

Definition at line 30 of file breakable.cpp.

Constructor & Destructor Documentation

◆ Breakable()

Breakable::Breakable ( )
inline

Definition at line 35 of file breakable.cpp.

Member Function Documentation

◆ Break()

void Breakable::Break ( )
inline

Definition at line 90 of file breakable.cpp.

◆ Create()

static Test* Breakable::Create ( )
inlinestatic

Definition at line 141 of file breakable.cpp.

◆ PostSolve()

void Breakable::PostSolve ( b2Contact contact,
const b2ContactImpulse impulse 
)
inlineoverridevirtual

This lets you inspect a contact after the solver is finished. This is useful for inspecting impulses. Note: the contact manifold does not include time of impact impulses, which can be arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly in a separate data structure. Note: this is only called for contacts that are touching, solid, and awake.

Reimplemented from Test.

Definition at line 66 of file breakable.cpp.

◆ Step()

void Breakable::Step ( Settings settings)
inlineoverridevirtual

Reimplemented from Test.

Definition at line 122 of file breakable.cpp.

Member Data Documentation

◆ m_angularVelocity

float Breakable::m_angularVelocity

Definition at line 148 of file breakable.cpp.

◆ m_body1

b2Body* Breakable::m_body1

Definition at line 146 of file breakable.cpp.

◆ m_break

bool Breakable::m_break

Definition at line 155 of file breakable.cpp.

◆ m_broke

bool Breakable::m_broke

Definition at line 154 of file breakable.cpp.

◆ m_piece1

b2Fixture* Breakable::m_piece1

Definition at line 151 of file breakable.cpp.

◆ m_piece2

b2Fixture* Breakable::m_piece2

Definition at line 152 of file breakable.cpp.

◆ m_shape1

b2PolygonShape Breakable::m_shape1

Definition at line 149 of file breakable.cpp.

◆ m_shape2

b2PolygonShape Breakable::m_shape2

Definition at line 150 of file breakable.cpp.

◆ m_velocity

b2Vec2 Breakable::m_velocity

Definition at line 147 of file breakable.cpp.


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


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