- 博客(4)
- 资源 (2)
- 收藏
- 关注
转载 c/c++ 里面的变长参数的实现
c里面的变长参数,c++里面也有。提供了:一个类型 va_list3个宏 va_start va_arg va_end使用的例子是这样的int foo(char* fmt, ...){ va_list args; va_start(args, fmt); int i = va_arg(args, int); doub
2011-06-11 21:08:00 2554
原创 椭圆内接多边形
#include#include#include#includeconst double TWO_PI =6.2831853;GLsizei winWidth=400,winHeight=400;GLuint regHex;class screenPt{public: GLint x,y;};static void init(vo
2011-06-08 15:27:00 1441
原创 DDA直线算法
#include #include #define ROUND(a) (int)(a + 0.5)void set_Pixel(GLint x, GLint y) { glBegin(GL_POINTS); glVertex2i(x, y); glEnd();}void line_DDA (int x0, int y0, int xEnd, int yEnd)
2011-06-08 15:25:00 942
原创 编程实现Sutherlang-Hodgman多边形裁剪算法
#include#include#include#includetypedef struct { float x,y;}wcPt2D;typedef enum{ Left,Right,Bottom,Top}Boundary;int Inside(wcPt2D p,Boundary b,wcPt2D wMin,wcPt2D wMax){
2011-06-08 15:24:00 7986
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人