| 564 | } |
| 565 | |
| 566 | void physicsCreate() { |
| 567 | // Initialize the physics engine |
| 568 | PhysicsManager::createSingleton(); |
| 569 | |
| 570 | mDemo.clear(); |
| 571 | |
| 572 | // Add the demos |
| 573 | physicDemo demo; |
| 574 | |
| 575 | demo.init = &demo1Create; |
| 576 | demo.update = &demo1Update; |
| 577 | demo.destroy = &demo1Destroy; |
| 578 | mDemo.push_back( demo ); |
| 579 | |
| 580 | demo.init = &demo2Create; |
| 581 | demo.update = &demo2Update; |
| 582 | demo.destroy = &demo2Destroy; |
| 583 | mDemo.push_back( demo ); |
| 584 | |
| 585 | demo.init = &demo3Create; |
| 586 | demo.update = &demo3Update; |
| 587 | demo.destroy = &demo3Destroy; |
| 588 | mDemo.push_back( demo ); |
| 589 | |
| 590 | demo.init = &demo4Create; |
| 591 | demo.update = &demo4Update; |
| 592 | demo.destroy = &demo4Destroy; |
| 593 | mDemo.push_back( demo ); |
| 594 | |
| 595 | ChangeDemo( 0 ); |
| 596 | } |
| 597 | |
| 598 | void physicsUpdate() { |
| 599 | // Creates a joint to drag any grabable object on the scene |