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

Method executeScriptEvent

Engine/source/afx/afxChoreographer.cpp:622–641  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

620}
621
622void afxChoreographer::executeScriptEvent(const char* method, afxConstraint* cons,
623 const MatrixF& xfm, const char* data)
624{
625 SceneObject* cons_obj = (cons) ? cons->getSceneObject() : NULL;
626
627 char *arg_buf = Con::getArgBuffer(256);
628 Point3F pos;
629 xfm.getColumn(3,&pos);
630 AngAxisF aa(xfm);
631 dSprintf(arg_buf,256,"%g %g %g %g %g %g %g",
632 pos.x, pos.y, pos.z,
633 aa.axis.x, aa.axis.y, aa.axis.z, aa.angle);
634
635 // CALL SCRIPT afxChoreographerData::method(%choreographer, %constraint, %transform, %data)
636 Con::executef(exeblock, method,
637 getIdString(),
638 (cons_obj) ? cons_obj->getIdString() : "",
639 arg_buf,
640 data);
641}
642
643void afxChoreographer::addObjectConstraint(SceneObject* object, const char* cons_name)
644{

Callers

nothing calls this directly

Calls 6

getArgBufferFunction · 0.85
dSprintfFunction · 0.85
executefFunction · 0.85
getColumnMethod · 0.80
getIdStringMethod · 0.80
getSceneObjectMethod · 0.45

Tested by

no test coverage detected