#include #include #include #include #include #include "winbgim.cpp" int gprintf( int xloc, int yloc, char *fmt, ... ) { va_list argptr; /* Argument list pointer */ char str[140]; /* Buffer to build sting into */ int cnt; /* Result of SPRINTF for return */ va_start( argptr, fmt ); /* Initialize va_ functions */ cnt = vsprintf( str, fmt, argptr ); /* prints string to buffer */ outtextxy( xloc, yloc, str ); /* Send string in graphics mode */ //yloc += textheight( "H" ) + 2; /* Advance to next line */ va_end( argptr ); /* Close va_ functions */ return( cnt ); /* Return the conversion count */ } float Cos[360]; float Sin[360]; struct Point{ public: float x,y,z; }; class Matrix3D{ public: //Point verts[8]; Point *verts; int numOfVerts; Matrix3D(); Matrix3D(char filename[]);//loading ~Matrix3D(); void draw(); //origin float xo, yo, zo; //the connection lines. //int lines[12][2]; int **lines; int numOfLines; void xyrot(int theta); void xzrot(int theta); void yzrot(int theta); void scale(float factor); void translate(int x, int y, int z); }; Matrix3D::Matrix3D(){ numOfVerts = 8; numOfLines = 12; verts = new Point[numOfVerts]; lines = new int*[numOfLines]; for(int i=0; i-->
Site hosted by Angelfire.com: Build your free website today!