Beispiel #1
0
    void DynamicsWorld::AddRigidBody(RigidBody &body, short group, short mask)
    {
        auto prevWorld = body.GetWorld();
        if (prevWorld != nullptr)
        {
            prevWorld->RemoveRigidBody(body);
        }

        body.SetWorld(this);
        this->world.addRigidBody(&body, group, mask);
    }
Beispiel #2
0
 void DynamicsWorld::RemoveRigidBody(RigidBody &body)
 {
     body.SetWorld(nullptr);
     this->world.removeRigidBody(&body);
 }