projects a point
| 77 | |
| 78 | // projects a point |
| 79 | void g3_ProjectPoint(g3Point *p) { |
| 80 | if (p->p3_flags & PF_PROJECTED || p->p3_codes & CC_BEHIND) |
| 81 | return; |
| 82 | |
| 83 | float one_over_z = 1.0 / p->p3_z; |
| 84 | p->p3_sx = Window_w2 + (p->p3_x * (Window_w2 * one_over_z)); |
| 85 | p->p3_sy = Window_h2 - (p->p3_y * (Window_h2 * one_over_z)); |
| 86 | p->p3_flags |= PF_PROJECTED; |
| 87 | } |
| 88 | |
| 89 | // from a 2d point, compute the vector through that point |
| 90 | void g3_Point2Vec(vector *v, int16_t sx, int16_t sy) { |
no outgoing calls
no test coverage detected