rotates a point. returns codes. does not check if already rotated
| 61 | |
| 62 | // rotates a point. returns codes. does not check if already rotated |
| 63 | uint8_t g3_RotatePoint(g3Point *dest, vector *src) { |
| 64 | // store the pre-rotated point |
| 65 | dest->p3_vecPreRot = *src; |
| 66 | |
| 67 | // find the point offset from the view/camera position |
| 68 | vector tempv = *src - View_position; |
| 69 | |
| 70 | // rotate the point by the view/camera's orientation |
| 71 | dest->p3_vec = tempv * View_matrix; |
| 72 | |
| 73 | // determine the flags for the point |
| 74 | dest->p3_flags = PF_ORIGPOINT; |
| 75 | return g3_CodePoint(dest); |
| 76 | } |
| 77 | |
| 78 | // projects a point |
| 79 | void g3_ProjectPoint(g3Point *p) { |
no test coverage detected