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

Method init

core/physics/PhysicsBody.cpp:305–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

303}
304
305bool PhysicsBody::init()
306{
307 do
308 {
309 _cpBody = cpBodyNew(_mass, _moment);
310 internalBodySetMass(_cpBody, _mass);
311 cpBodySetUserData(_cpBody, this);
312 cpBodySetVelocityUpdateFunc(_cpBody, internalBodyUpdateVelocity);
313
314 AX_BREAK_IF(_cpBody == nullptr);
315
316 return true;
317 } while (false);
318
319 return false;
320}
321
322void PhysicsBody::removeJoint(PhysicsJoint* joint)
323{

Callers 8

createMethod · 0.45
createCircleMethod · 0.45
createBoxMethod · 0.45
createPolygonMethod · 0.45
createEdgeSegmentMethod · 0.45
createEdgeBoxMethod · 0.45
createEdgePolygonMethod · 0.45
createEdgeChainMethod · 0.45

Calls 4

cpBodyNewFunction · 0.85
internalBodySetMassFunction · 0.85
cpBodySetUserDataFunction · 0.85

Tested by

no test coverage detected