| 1490 | } |
| 1491 | |
| 1492 | xVec3 world_to_screen(const xVec3& loc) |
| 1493 | { |
| 1494 | iCameraUpdatePos(globals.camera.lo_cam, &globals.camera.mat); |
| 1495 | |
| 1496 | xVec3 world_loc; |
| 1497 | xMat4x3* view_mat = (xMat4x3*)&globals.camera.lo_cam->viewMatrix; |
| 1498 | xMat4x3Toworld(&world_loc, view_mat, &loc); |
| 1499 | |
| 1500 | xVec3 screen_loc; |
| 1501 | F32 iz = 1.0f / world_loc.z; |
| 1502 | screen_loc.assign(world_loc.x * iz, world_loc.y * iz, 1.0f); |
| 1503 | |
| 1504 | return screen_loc; |
| 1505 | } |
| 1506 | |
| 1507 | S32 find_locked_target(const xVec3* target) |
| 1508 | { |
no test coverage detected