| 571 | } |
| 572 | |
| 573 | void afxSelectron::init_constraints() |
| 574 | { |
| 575 | if (constraints_initialized) |
| 576 | { |
| 577 | //Con::printf("CONSTRAINTS ALREADY INITIALIZED"); |
| 578 | return; |
| 579 | } |
| 580 | |
| 581 | Vector<afxConstraintDef> defs; |
| 582 | datablock->gatherConstraintDefs(defs); |
| 583 | |
| 584 | constraint_mgr->initConstraintDefs(defs, isServerObject()); |
| 585 | |
| 586 | if (isClientObject()) |
| 587 | { |
| 588 | // find local camera |
| 589 | camera_cons_obj = get_camera(); |
| 590 | if (camera_cons_obj) |
| 591 | camera_cons_id = constraint_mgr->setReferenceObject(CAMERA_CONS, camera_cons_obj); |
| 592 | |
| 593 | // find local listener |
| 594 | Point3F listener_pos; |
| 595 | listener_pos = SFX->getListener().getTransform().getPosition(); |
| 596 | listener_cons_id = constraint_mgr->setReferencePoint(LISTENER_CONS, listener_pos); |
| 597 | |
| 598 | // find free target |
| 599 | free_target_cons_id = constraint_mgr->setReferencePoint(FREE_TARGET_CONS, arcaneFX::sFreeTargetPos); |
| 600 | } |
| 601 | |
| 602 | constraint_mgr->adjustProcessOrdering(this); |
| 603 | |
| 604 | constraints_initialized = true; |
| 605 | } |
| 606 | |
| 607 | void afxSelectron::setup_main_fx() |
| 608 | { |
nothing calls this directly
no test coverage detected