| 353 | }; |
| 354 | |
| 355 | static inline int clip2d(g3Point *pnt, clip_wnd *wnd) { |
| 356 | int ret = 0; |
| 357 | if (pnt->p3_codes & CC_BEHIND) |
| 358 | return CC_BEHIND; |
| 359 | |
| 360 | if (pnt->p3_sx < wnd->left) |
| 361 | ret |= CC_OFF_LEFT; |
| 362 | if (pnt->p3_sx > wnd->right) |
| 363 | ret |= CC_OFF_RIGHT; |
| 364 | if (pnt->p3_sy < wnd->top) |
| 365 | ret |= CC_OFF_TOP; |
| 366 | if (pnt->p3_sy > wnd->bot) |
| 367 | ret |= CC_OFF_BOT; |
| 368 | return ret; |
| 369 | } |
| 370 | |
| 371 | // Returns true if a line intersects another line |
| 372 | static inline bool LineIntersectsLine(g3Point *ls, g3Point *le, float x1, float y1, float x2, float y2) { |
no outgoing calls
no test coverage detected