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

Function internalBodySetMass

core/physics/PhysicsBody.cpp:41–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39# include "physics/PhysicsHelper.h"
40
41static void internalBodySetMass(cpBody* body, cpFloat mass)
42{
43 cpBodyActivate(body);
44 body->m = mass;
45 body->m_inv = 1.0f / mass;
46 // cpAssertSaneBody(body);
47}
48
49static void internalBodyUpdateVelocity(cpBody* body, cpVect gravity, cpFloat damping, cpFloat dt)
50{

Callers 4

initMethod · 0.85
setDynamicMethod · 0.85
setMassMethod · 0.85
addMassMethod · 0.85

Calls 1

cpBodyActivateFunction · 0.85

Tested by

no test coverage detected