MCPcopy Create free account
hub / github.com/axmolengine/axmol / Test

Method Test

tests/cpp-tests/Source/Box2DTestBed/test.cpp:46–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46Test::Test()
47{
48 b2Vec2 gravity;
49 gravity.Set(0.0f, -10.0f);
50 m_world = new b2World(gravity);
51 m_bomb = NULL;
52 m_textLine = 30;
53 m_textIncrement = 13;
54 m_mouseJoint = NULL;
55 m_pointCount = 0;
56
57 m_destructionListener.test = this;
58 m_world->SetDestructionListener(&m_destructionListener);
59 m_world->SetContactListener(this);
60 m_world->SetDebugDraw(&g_debugDraw);
61
62 m_bombSpawning = false;
63
64 m_stepCount = 0;
65
66 b2BodyDef bodyDef;
67 m_groundBody = m_world->CreateBody(&bodyDef);
68
69 memset(&m_maxProfile, 0, sizeof(b2Profile));
70 memset(&m_totalProfile, 0, sizeof(b2Profile));
71}
72
73Test::~Test()
74{

Callers

nothing calls this directly

Calls 5

SetContactListenerMethod · 0.80
SetDebugDrawMethod · 0.80
CreateBodyMethod · 0.80
SetMethod · 0.45

Tested by

no test coverage detected