| 483 | } |
| 484 | |
| 485 | Handle::PhysicsObjectHandle |
| 486 | PhysicsSystem::makeRigidBody(Handle::CollisionShapeHandle shape, const Math::Matrix& transform, float mass) |
| 487 | { |
| 488 | Handle::PhysicsObjectHandle ph = m_PhysicsObjectAllocator.createObject(); |
| 489 | PhysicsObject& p = getPhysicsObject(ph); |
| 490 | CollisionShape& s = getCollisionShape(shape); |
| 491 | |
| 492 | p.collisionShape = shape; |
| 493 | p.rigidBody = new btRigidBody(mass, nullptr, s.collisionShape); // TODO: Implement motionstate and inertia |
| 494 | |
| 495 | // Add to physics-world |
| 496 | m_pDynamicsWorld->addRigidBody(p.rigidBody); |
| 497 | |
| 498 | return Handle::PhysicsObjectHandle(); |
| 499 | } |
| 500 | |
| 501 | void PhysicsSystem::compoundShapeAddChild(Handle::CollisionShapeHandle target, Handle::CollisionShapeHandle childShape, const Math::Matrix& localTransform) |
| 502 | { |
no test coverage detected