摘要: 对线段进行裁剪,返回裁剪后的线段,完全自己想的没什么优化,应该还有些BUG暂时不做深究,效果图如下未裁剪:裁剪后:代码://点typedef struct sc_point{ int x,y; sc_point(){x=0;y=0;};}ScPoint;//线typedef struct sc_line{ ScPoint point1,point2;}ScLine;bool CEnginApp::ClearLine(const ScLine *line,ScLine &line2){ if (!line) return false; int x1=0,x2=0,y1=0,y2=0,te 阅读全文
posted @ 2012-08-31 13:39 冷夜 - 网游编程技术 阅读(446) 评论(0) 推荐(0) 编辑