| 1080 | } |
| 1081 | |
| 1082 | void 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 | |
| 1095 | void afxCamera::onEditorEnable() |
| 1096 | { |
no test coverage detected