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

Method get_camera

Engine/source/afx/afxChoreographer.cpp:428–452  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428SceneObject* afxChoreographer::get_camera(Point3F* cam_pos) const
429{
430 GameConnection* conn = GameConnection::getConnectionToServer();
431 if (!conn)
432 {
433 if (cam_pos)
434 cam_pos->zero();
435 return 0;
436 }
437
438 SceneObject* cam_obj = conn->getCameraObject();
439 if (cam_pos)
440 {
441 if (cam_obj)
442 {
443 MatrixF cam_mtx;
444 conn->getControlCameraTransform(0, &cam_mtx);
445 cam_mtx.getColumn(3, cam_pos);
446 }
447 else
448 cam_pos->zero();
449 }
450
451 return cam_obj;
452}
453
454U32 afxChoreographer::packUpdate(NetConnection* conn, U32 mask, BitStream* stream)
455{

Callers

nothing calls this directly

Calls 4

getCameraObjectMethod · 0.80
getColumnMethod · 0.80
zeroMethod · 0.45

Tested by

no test coverage detected