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

Method init_constraints

Engine/source/afx/afxEffectron.cpp:554–590  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

552}
553
554void afxEffectron::init_constraints()
555{
556 if (constraints_initialized)
557 {
558 //Con::printf("CONSTRAINTS ALREADY INITIALIZED");
559 return;
560 }
561
562 Vector<afxConstraintDef> defs;
563 datablock->gatherConstraintDefs(defs);
564
565 constraint_mgr->initConstraintDefs(defs, isServerObject());
566
567 if (isServerObject())
568 {
569 // find local camera
570 camera_cons_obj = get_camera();
571 if (camera_cons_obj)
572 camera_cons_id = constraint_mgr->setReferenceObject(CAMERA_CONS, camera_cons_obj);
573 }
574 else // if (isClientObject())
575 {
576 // find local camera
577 camera_cons_obj = get_camera();
578 if (camera_cons_obj)
579 camera_cons_id = constraint_mgr->setReferenceObject(CAMERA_CONS, camera_cons_obj);
580
581 // find local listener
582 Point3F listener_pos;
583 listener_pos = SFX->getListener().getTransform().getPosition();
584 listener_cons_id = constraint_mgr->setReferencePoint(LISTENER_CONS, listener_pos);
585 }
586
587 constraint_mgr->adjustProcessOrdering(this);
588
589 constraints_initialized = true;
590}
591
592void afxEffectron::init_scoping()
593{

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