亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? math3d.c

?? 這是針對 Linux (i386)平臺的 minigui 3.6.2 開發包(MiniGUI-Processes 運行模式)。
?? C
?? 第 1 頁 / 共 2 頁
字號:
   MATRIX_f rotation;   int i, j;   get_vector_rotation_matrix_f(&rotation, fixtof(x), fixtof(y), fixtof(z), fixtof(a));   for (i=0; i<3; i++)      for (j=0; j<3; j++)	 m->v[i][j] = ftofix(rotation.v[i][j]);   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_vector_rotation_matrix_f: *  Floating point version of get_vector_rotation_matrix(). */void get_vector_rotation_matrix_f(MATRIX_f *m, float x, float y, float z, float a){   float c = floatcos(a);   float s = floatsin(a);   float cc = 1 - c;   normalize_vector_f(&x, &y, &z);   m->v[0][0] = (cc * x * x) + c;   m->v[0][1] = (cc * x * y) + (z * s);   m->v[0][2] = (cc * x * z) - (y * s);   m->v[1][0] = (cc * x * y) - (z * s);   m->v[1][1] = (cc * y * y) + c;   m->v[1][2] = (cc * z * y) + (x * s);   m->v[2][0] = (cc * x * z) + (y * s);   m->v[2][1] = (cc * y * z) - (x * s);   m->v[2][2] = (cc * z * z) + c;   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_transformation_matrix: *  Constructs a 3d transformation matrix, which will rotate points around *  all three axis by the specified amounts (given in the Allegro fixed  *  point, 256 degrees to a circle format), scale the result by the *  specified amount (itofix(1) for no change of scale), and then translate *  to the requested x, y, z position. */void get_transformation_matrix(MATRIX *m, fixed scale, fixed xrot, fixed yrot, fixed zrot, fixed x, fixed y, fixed z){   MAKE_ROTATION(xrot, yrot, zrot);   m->v[0][0] = fmul(R00, scale);   m->v[0][1] = fmul(R01, scale);   m->v[0][2] = fmul(R02, scale);   m->v[1][0] = fmul(R10, scale);   m->v[1][1] = fmul(R11, scale);   m->v[1][2] = fmul(R12, scale);   m->v[2][0] = fmul(R20, scale);   m->v[2][1] = fmul(R21, scale);   m->v[2][2] = fmul(R22, scale);   m->t[0] = x;   m->t[1] = y;   m->t[2] = z;}/* get_transformation_matrix_f: *  Floating point version of get_transformation_matrix(). */void get_transformation_matrix_f(MATRIX_f *m, float scale, float xrot, float yrot, float zrot, float x, float y, float z){   MAKE_ROTATION_f(xrot, yrot, zrot);   m->v[0][0] = R00_f * scale;   m->v[0][1] = R01_f * scale;   m->v[0][2] = R02_f * scale;   m->v[1][0] = R10_f * scale;   m->v[1][1] = R11_f * scale;   m->v[1][2] = R12_f * scale;   m->v[2][0] = R20_f * scale;   m->v[2][1] = R21_f * scale;   m->v[2][2] = R22_f * scale;   m->t[0] = x;   m->t[1] = y;   m->t[2] = z;}/* get_camera_matrix:  *  Constructs a camera matrix for translating world-space objects into *  a normalised view space, ready for the perspective projection. The *  x, y, and z parameters specify the camera position, xfront, yfront, *  and zfront is an 'in front' vector specifying which way the camera *  is facing (this can be any length: normalisation is not required), *  and xup, yup, and zup is the 'up' direction vector. Up is really only *  a 1.5d vector, since the front vector only leaves one degree of freedom *  for which way up to put the image, but it is simplest to specify it *  as a full 3d direction even though a lot of the information in it is *  discarded. The fov parameter specifies the field of view (ie. width *  of the camera focus) in fixed point, 256 degrees to the circle format. *  For typical projections, a field of view in the region 32-48 will work *  well. Finally, the aspect ratio is used to scale the Y dimensions of *  the image relative to the X axis, so you can use it to correct for *  the proportions of the output image (set it to 1 for no scaling). */void get_camera_matrix(MATRIX *m, fixed x, fixed y, fixed z, fixed xfront, fixed yfront, fixed zfront, fixed xup, fixed yup, fixed zup, fixed fov, fixed aspect){   MATRIX_f camera;   int i, j;   get_camera_matrix_f(&camera,		       fixtof(x), fixtof(y), fixtof(z), 		       fixtof(xfront), fixtof(yfront), fixtof(zfront), 		       fixtof(xup), fixtof(yup), fixtof(zup), 		       fixtof(fov), fixtof(aspect));   for (i=0; i<3; i++) {      for (j=0; j<3; j++)	 m->v[i][j] = ftofix(camera.v[i][j]);      m->t[i] = ftofix(camera.t[i]);   }}/* get_camera_matrix_f:  *  Floating point version of get_camera_matrix(). */void get_camera_matrix_f(MATRIX_f *m, float x, float y, float z, float xfront, float yfront, float zfront, float xup, float yup, float zup, float fov, float aspect){   MATRIX_f camera, scale;   float xside, yside, zside, width, d;   /* make 'in-front' into a unit vector, and negate it */   normalize_vector_f(&xfront, &yfront, &zfront);   xfront = -xfront;   yfront = -yfront;   zfront = -zfront;   /* make sure 'up' is at right angles to 'in-front', and normalize */   d = dot_product_f(xup, yup, zup, xfront, yfront, zfront);   xup -= d * xfront;    yup -= d * yfront;    zup -= d * zfront;   normalize_vector_f(&xup, &yup, &zup);   /* calculate the 'sideways' vector */   cross_product_f(xup, yup, zup, xfront, yfront, zfront, &xside, &yside, &zside);   /* set matrix rotation parameters */   camera.v[0][0] = xside;    camera.v[0][1] = yside;   camera.v[0][2] = zside;   camera.v[1][0] = xup;    camera.v[1][1] = yup;   camera.v[1][2] = zup;   camera.v[2][0] = xfront;    camera.v[2][1] = yfront;   camera.v[2][2] = zfront;   /* set matrix translation parameters */   camera.t[0] = -(x*xside  + y*yside  + z*zside);   camera.t[1] = -(x*xup    + y*yup    + z*zup);   camera.t[2] = -(x*xfront + y*yfront + z*zfront);   /* construct a scaling matrix to deal with aspect ratio and FOV */   width = floattan(64.0 - fov/2);   get_scaling_matrix_f(&scale, width, -aspect*width*4/3, -1.0);   /* combine the camera and scaling matrices */   matrix_mul_f(&camera, &scale, m);}/* qtranslate_matrix: *  Adds a position offset to an existing matrix. */void qtranslate_matrix(MATRIX *m, fixed x, fixed y, fixed z){   m->t[0] += x;   m->t[1] += y;   m->t[2] += z;}/* qtranslate_matrix_f: *  Floating point version of qtranslate_matrix(). */void qtranslate_matrix_f(MATRIX_f *m, float x, float y, float z){   m->t[0] += x;   m->t[1] += y;   m->t[2] += z;}/* qscale_matrix: *  Adds a scaling factor to an existing matrix. */void qscale_matrix(MATRIX *m, fixed scale){   int i, j;   for (i=0; i<3; i++)      for (j=0; j<3; j++)	 m->v[i][j] = fmul(m->v[i][j], scale);}/* qscale_matrix_f: *  Floating point version of qscale_matrix(). */void qscale_matrix_f(MATRIX_f *m, float scale){   int i, j;   for (i=0; i<3; i++)      for (j=0; j<3; j++)	 m->v[i][j] *= scale;}/* matrix_mul: *  Multiplies two matrices, storing the result in out (this must be *  different from the two input matrices). The resulting matrix will *  have the same effect as the combination of m1 and m2, ie. when *  applied to a vector v, (v * out) = ((v * m1) * m2). Any number of *  transformations can be concatenated in this way. */void matrix_mul(AL_CONST MATRIX *m1, AL_CONST MATRIX *m2, MATRIX *out){   MATRIX temp;   int i, j;   if (m1 == out) {      temp = *m1;      m1 = &temp;   }   else if (m2 == out) {      temp = *m2;      m2 = &temp;   }   for (i=0; i<3; i++) {      for (j=0; j<3; j++) {	 out->v[i][j] = fmul(m1->v[0][j], m2->v[i][0]) +			fmul(m1->v[1][j], m2->v[i][1]) +			fmul(m1->v[2][j], m2->v[i][2]);      }      out->t[i] = fmul(m1->t[0], m2->v[i][0]) +		  fmul(m1->t[1], m2->v[i][1]) +		  fmul(m1->t[2], m2->v[i][2]) +		  m2->t[i];   } }/* matrix_mul_f: *  Floating point version of matrix_mul(). */void matrix_mul_f(AL_CONST MATRIX_f *m1, AL_CONST MATRIX_f *m2, MATRIX_f *out){   MATRIX_f temp;   int i, j;   if (m1 == out) {      temp = *m1;      m1 = &temp;   }   else if (m2 == out) {      temp = *m2;      m2 = &temp;   }   for (i=0; i<3; i++) {      for (j=0; j<3; j++) {	 out->v[i][j] = (m1->v[0][j] * m2->v[i][0]) +			(m1->v[1][j] * m2->v[i][1]) +			(m1->v[2][j] * m2->v[i][2]);      }      out->t[i] = (m1->t[0] * m2->v[i][0]) +		  (m1->t[1] * m2->v[i][1]) +		  (m1->t[2] * m2->v[i][2]) +		  m2->t[i];   }}/* vector_length:  *  Computes the length of a vector, using the son of the squaw... */fixed vector_length(fixed x, fixed y, fixed z){   x >>= 8;   y >>= 8;   z >>= 8;   return (fsqrt(fmul(x,x) + fmul(y,y) + fmul(z,z)) << 8);}/* vector_lengthf:  *  Floating point version of vector_length(). */float vector_length_f(float x, float y, float z){   return sqrt(x*x + y*y + z*z);}/* normalize_vector:  *  Converts the specified vector to a unit vector, which has the same *  orientation but a length of one. */void normalize_vector(fixed *x, fixed *y, fixed *z){   fixed length = vector_length(*x, *y, *z);   *x = fdiv(*x, length);   *y = fdiv(*y, length);   *z = fdiv(*z, length);}/* normalize_vectorf:  *  Floating point version of normalize_vector(). */void normalize_vector_f(float *x, float *y, float *z){   float length = 1.0 / vector_length_f(*x, *y, *z);   *x *= length;   *y *= length;   *z *= length;}/* cross_product: *  Calculates the cross product of two vectors. */void cross_product(fixed x1, fixed y1, fixed z1, fixed x2, fixed y2, fixed z2, fixed *xout, fixed *yout, fixed *zout){    *xout = fmul(y1, z2) - fmul(z1, y2);    *yout = fmul(z1, x2) - fmul(x1, z2);    *zout = fmul(x1, y2) - fmul(y1, x2);}/* cross_productf: *  Floating point version of cross_product(). */void cross_product_f(float x1, float y1, float z1, float x2, float y2, float z2, float *xout, float *yout, float *zout){    *xout = (y1 * z2) - (z1 * y2);    *yout = (z1 * x2) - (x1 * z2);    *zout = (x1 * y2) - (y1 * x2);}/* polygon_z_normal: *  Helper function for backface culling: returns the z component of the *  normal vector to the polygon formed from the three vertices. */fixed polygon_z_normal(AL_CONST V3D *v1, AL_CONST V3D *v2, AL_CONST V3D *v3){   return (fmul(v2->x-v1->x, v3->y-v2->y) - fmul(v3->x-v2->x, v2->y-v1->y));}/* polygon_z_normal_f: *  Floating point version of polygon_z_normal(). */float polygon_z_normal_f(AL_CONST V3D_f *v1, AL_CONST V3D_f *v2, AL_CONST V3D_f *v3){   return ((v2->x-v1->x) * (v3->y-v2->y)) - ((v3->x-v2->x) * (v2->y-v1->y));}/* scaling factors for the perspective projection */fixed _persp_xscale = 160 << 16;fixed _persp_yscale = 100 << 16;fixed _persp_xoffset = 160 << 16;fixed _persp_yoffset = 100 << 16;float _persp_xscale_f = 160.0;float _persp_yscale_f = 100.0;float _persp_xoffset_f = 160.0;float _persp_yoffset_f = 100.0;/* set_projection_viewport: *  Sets the viewport used to scale the output of the persp_project()  *  function. */void set_projection_viewport(int x, int y, int w, int h){   _persp_xscale = itofix(w/2);   _persp_yscale = itofix(h/2);   _persp_xoffset = itofix(x + w/2);   _persp_yoffset = itofix(y + h/2);   _persp_xscale_f = w/2;   _persp_yscale_f = h/2;   _persp_xoffset_f = x + w/2;   _persp_yoffset_f = y + h/2;}#endif /* _MATH_3D */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美成人性福生活免费看| 日本亚洲一区二区| 日韩精品免费专区| 成人性视频网站| 欧美老年两性高潮| 国产精品传媒视频| 国产一区二区三区黄视频 | 午夜国产精品一区| 成人黄动漫网站免费app| 欧美电影免费观看高清完整版在线观看| 国产精品久久久久一区| 精品一区二区三区免费毛片爱| 在线观看视频一区二区欧美日韩| 久久久精品中文字幕麻豆发布| 亚洲成av人在线观看| 大白屁股一区二区视频| 久久综合色播五月| 另类小说综合欧美亚洲| 欧美日韩国产综合一区二区三区| 国产精品久久久久影院色老大| 久久精品国产精品亚洲精品| 欧美人牲a欧美精品| 亚洲免费av在线| 成人av网址在线| wwww国产精品欧美| 狠狠色狠狠色合久久伊人| 在线成人av网站| 亚洲香蕉伊在人在线观| 在线观看亚洲成人| 亚洲香肠在线观看| 欧美视频一区二区三区| 亚洲香肠在线观看| 精品视频1区2区3区| 一区二区激情小说| 欧美性大战xxxxx久久久| 亚洲一区二区三区四区在线观看| 99久久精品一区| 国产欧美日本一区视频| 国产白丝精品91爽爽久久 | 国产精品毛片久久久久久久| 国产成人av影院| 国产欧美一二三区| 99v久久综合狠狠综合久久| 国产精品久久99| 99vv1com这只有精品| 亚洲靠逼com| 欧美日韩一二三区| 青青青爽久久午夜综合久久午夜| 欧美一区二区三区视频免费| 久久精品72免费观看| 久久亚洲精品国产精品紫薇| 国产精品亚洲一区二区三区妖精| 欧美国产精品专区| 91久久精品一区二区| 亚洲成人动漫av| 日韩久久免费av| 成人网男人的天堂| 亚洲国产一区二区a毛片| 欧美一区午夜精品| 国产麻豆精品视频| 国产精品电影一区二区三区| 欧美日韩日日骚| 精品亚洲国内自在自线福利| 中文字幕免费不卡| 欧美日韩一区视频| 国产一区二区91| 一区二区三区成人| 欧美成人性战久久| 色婷婷一区二区三区四区| 奇米精品一区二区三区在线观看一| 久久综合九色综合97婷婷| 色综合天天综合网天天看片| 日韩国产欧美在线视频| 国产精品少妇自拍| 欧美日韩亚洲高清一区二区| 国产剧情在线观看一区二区| 亚洲免费在线播放| xnxx国产精品| 欧美三级欧美一级| 国产麻豆精品视频| 日韩精品一级中文字幕精品视频免费观看| 久久精品欧美日韩| 欧美日韩亚洲另类| av色综合久久天堂av综合| 青青草伊人久久| 亚洲美腿欧美偷拍| 中文字幕免费不卡在线| 日韩一区国产二区欧美三区| 91麻豆蜜桃一区二区三区| 国内精品伊人久久久久av影院| 亚洲综合久久久久| 中文字幕一区二区视频| 久久久午夜精品| 制服丝袜亚洲色图| 欧美主播一区二区三区美女| 成人丝袜高跟foot| 国产麻豆成人精品| 蜜桃av一区二区三区电影| 亚洲综合久久久| 亚洲欧美激情小说另类| 国产精品久久久久毛片软件| 久久免费视频一区| 日韩欧美高清一区| 欧美一区二区三区不卡| 欧美三级电影网| 色婷婷久久久久swag精品| 成人福利在线看| 国产精品一区不卡| 国产精品一区二区三区四区| 美国精品在线观看| 美日韩一区二区三区| 日韩国产高清影视| 日韩在线一区二区三区| 视频一区中文字幕国产| 视频一区二区国产| 日本成人在线看| 久久国产精品无码网站| 久久国产麻豆精品| 经典三级视频一区| 国产毛片精品国产一区二区三区| 美女被吸乳得到大胸91| 日韩不卡一二三区| 久久99精品国产麻豆婷婷| 久热成人在线视频| 久草中文综合在线| 国产精品一区二区三区四区 | 五月综合激情日本mⅴ| 五月天婷婷综合| 麻豆91免费看| 国产一区二区不卡在线| 成人在线视频一区| 91免费看片在线观看| 91成人网在线| 正在播放一区二区| 久久精品视频网| 中文字幕一区二区在线观看| 亚洲最大成人网4388xx| 无吗不卡中文字幕| 麻豆久久一区二区| 成人精品视频一区二区三区尤物| 粉嫩aⅴ一区二区三区四区五区| av亚洲精华国产精华精| 欧美日韩视频在线第一区| 精品美女在线播放| 中文字幕一区在线观看视频| 亚洲午夜三级在线| 国产又黄又大久久| 91视视频在线直接观看在线看网页在线看| 日本高清无吗v一区| 欧美一级午夜免费电影| 国产日产亚洲精品系列| 一区二区三区在线视频观看| 日韩精品一级二级 | 国产亚洲欧美日韩在线一区| 中文字幕欧美一| 日韩av二区在线播放| 懂色av一区二区三区免费看| 欧美日韩亚州综合| 欧美国产日本韩| 日韩精品亚洲一区二区三区免费| 国产夫妻精品视频| 欧美浪妇xxxx高跟鞋交| 国产欧美精品一区二区三区四区| 亚洲午夜三级在线| 国产成人免费xxxxxxxx| 欧美日韩日日夜夜| 中文字幕一区二区三区不卡| 日日夜夜精品视频免费| 成人激情av网| 欧美精品一区二区三区四区 | 亚洲日本在线天堂| 韩国精品主播一区二区在线观看| 91啦中文在线观看| 国产三级欧美三级| 美日韩一区二区| 欧美色倩网站大全免费| 亚洲欧美中日韩| 国产精品伊人色| 欧美一区二区在线不卡| 一区二区三区在线影院| a亚洲天堂av| 久久久久亚洲蜜桃| 久久精品99久久久| 337p亚洲精品色噜噜噜| 亚洲综合色视频| 99久久久久久99| 日本一区二区免费在线| 久久精品国产精品青草| 91精品国产麻豆| 天天亚洲美女在线视频| 欧洲生活片亚洲生活在线观看| 国产精品久久久久国产精品日日| 极品少妇xxxx精品少妇偷拍| 欧美久久久一区| 亚洲影视在线观看| 欧美色图片你懂的| 亚洲亚洲人成综合网络| 欧美视频在线播放| 日韩av电影天堂| 欧美一区二区三区免费观看视频 |