| 303 | } |
| 304 | |
| 305 | bool 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 | |
| 322 | void PhysicsBody::removeJoint(PhysicsJoint* joint) |
| 323 | { |
no test coverage detected