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

Method setTransform

Engine/source/afx/afxCamera.cpp:1082–1093  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1080}
1081
1082void afxCamera::setTransform(const MatrixF& mat)
1083{
1084 // This method should never be called on the client.
1085
1086 // This currently converts all rotation in the mat into
1087 // rotations around the z and x axis.
1088 Point3F pos,vec;
1089 mat.getColumn(1,&vec);
1090 mat.getColumn(3,&pos);
1091 Point3F rot(-mAtan2(vec.z, mSqrt(vec.x*vec.x + vec.y*vec.y)),0,-mAtan2(-vec.x,vec.y));
1092 set_cam_pos(pos,rot);
1093}
1094
1095void afxCamera::onEditorEnable()
1096{

Callers 2

create_splashMethod · 0.45
updateSoundMethod · 0.45

Calls 3

mAtan2Function · 0.85
mSqrtFunction · 0.85
getColumnMethod · 0.80

Tested by

no test coverage detected