MCPcopy Create free account
hub / github.com/REGoth-project/REGoth / compoundShapeAddChild

Method compoundShapeAddChild

src/physics/PhysicsSystem.cpp:501–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499}
500
501void PhysicsSystem::compoundShapeAddChild(Handle::CollisionShapeHandle target, Handle::CollisionShapeHandle childShape, const Math::Matrix& localTransform)
502{
503 CollisionShape& ts = getCollisionShape(target);
504 CollisionShape& cs = getCollisionShape(childShape);
505
506 assert(ts.shapeType == CollisionShape::Compound);
507
508 btCompoundShape* compShape = reinterpret_cast<btCompoundShape*>(ts.collisionShape);
509
510 btTransform btr;
511 btr.setFromOpenGLMatrix(localTransform.mv);
512 compShape->addChildShape(btr, cs.collisionShape);
513}
514
515void PhysicsSystem::postProcessLoad()
516{

Callers 2

initMethod · 0.80
updateCollisionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected