MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / init_constraints

Method init_constraints

Engine/source/afx/afxSelectron.cpp:573–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573void 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
607void afxSelectron::setup_main_fx()
608{

Callers

nothing calls this directly

Calls 8

initConstraintDefsMethod · 0.80
getListenerMethod · 0.80
adjustProcessOrderingMethod · 0.80
setReferencePointMethod · 0.60
gatherConstraintDefsMethod · 0.45
setReferenceObjectMethod · 0.45
getPositionMethod · 0.45
getTransformMethod · 0.45

Tested by

no test coverage detected