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

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

?? math3d.c

?? 這是針對 Linux (i386)平臺的 minigui 3.6.2 開發包(MiniGUI-Processes 運行模式)。
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: math3d.c,v 1.4 2004/06/16 09:30:21 weiym Exp $**** math3d.c: the three-Dimension math routines.**** Copyright (C) 2003 Feynman Software.** ** Current maintainer: Wei Yongming.*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*//*         ______   ___    ___  *        /\  _  \ /\_ \  /\_ \  *        \ \ \L\ \\//\ \ \//\ \      __     __   _ __   ___  *         \ \  __ \ \ \ \  \ \ \   /'__`\ /'_ `\/\`'__\/ __`\ *          \ \ \/\ \ \_\ \_ \_\ \_/\  __//\ \L\ \ \ \//\ \L\ \ *           \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/ *            \/_/\/_/\/____/\/____/\/____/\/___L\ \/_/ \/___/ *                                           /\____/ *                                           \_/__/ * *      Vector and matrix manipulation routines. * *      By Shawn Hargreaves. * *      See readme.txt for copyright information. */#include "common.h"#ifdef _MATH_3D#include "fixedmath.h"#ifndef M_PI   #define M_PI   3.14159265358979323846#endif#define floatcos(x)     cos((x) * M_PI / 128.0)#define floatsin(x)     sin((x) * M_PI / 128.0)#define floattan(x)     tan((x) * M_PI / 128.0)MATRIX identity_matrix = {   {      /* 3x3 identity */      { 1<<16, 0,     0     },      { 0,     1<<16, 0     },      { 0,     0,     1<<16 },   },   /* zero translation */   { 0, 0, 0 }};MATRIX_f identity_matrix_f = {   {      /* 3x3 identity */      { 1.0, 0.0, 0.0 },      { 0.0, 1.0, 0.0 },      { 0.0, 0.0, 1.0 },   },   /* zero translation */   { 0.0, 0.0, 0.0 }};/* get_translation_matrix: *  Constructs a 3d translation matrix. When applied to the vector  *  (vx, vy, vx), this will produce (vx+x, vy+y, vz+z). */void get_translation_matrix(MATRIX *m, fixed x, fixed y, fixed z){   *m = identity_matrix;   m->t[0] = x;   m->t[1] = y;   m->t[2] = z;}/* get_translation_matrix_f: *  Floating point version of get_translation_matrix(). */void get_translation_matrix_f(MATRIX_f *m, float x, float y, float z){   *m = identity_matrix_f;   m->t[0] = x;   m->t[1] = y;   m->t[2] = z;}/* get_scaling_matrix: *  Constructs a 3d scaling matrix. When applied to the vector  *  (vx, vy, vx), this will produce (vx*x, vy*y, vz*z). */void get_scaling_matrix(MATRIX *m, fixed x, fixed y, fixed z){   *m = identity_matrix;   m->v[0][0] = x;   m->v[1][1] = y;   m->v[2][2] = z;}/* get_scaling_matrix_f: *  Floating point version of get_scaling_matrix(). */void get_scaling_matrix_f(MATRIX_f *m, float x, float y, float z){   *m = identity_matrix_f;   m->v[0][0] = x;   m->v[1][1] = y;   m->v[2][2] = z;}/* get_x_rotate_matrix: *  Constructs a 3d transformation matrix, which will rotate points around  *  the x axis by the specified amount (given in the Allegro fixed point,  *  256 degrees to a circle format). */void get_x_rotate_matrix(MATRIX *m, fixed r){   fixed c = fcos(r);   fixed s = fsin(r);   *m = identity_matrix;   m->v[1][1] = c;   m->v[1][2] = -s;   m->v[2][1] = s;   m->v[2][2] = c;}/* get_x_rotate_matrix_f: *  Floating point version of get_x_rotate_matrix(). */void get_x_rotate_matrix_f(MATRIX_f *m, float r){   float c = floatcos(r);   float s = floatsin(r);   *m = identity_matrix_f;   m->v[1][1] = c;   m->v[1][2] = -s;   m->v[2][1] = s;   m->v[2][2] = c;}/* get_y_rotate_matrix: *  Constructs a 3d transformation matrix, which will rotate points around  *  the y axis by the specified amount (given in the Allegro fixed point,  *  256 degrees to a circle format). */void get_y_rotate_matrix(MATRIX *m, fixed r){   fixed c = fcos(r);   fixed s = fsin(r);   *m = identity_matrix;   m->v[0][0] = c;   m->v[0][2] = s;   m->v[2][0] = -s;   m->v[2][2] = c;}/* get_y_rotate_matrix_f: *  Floating point version of get_y_rotate_matrix(). */void get_y_rotate_matrix_f(MATRIX_f *m, float r){   float c = floatcos(r);   float s = floatsin(r);   *m = identity_matrix_f;   m->v[0][0] = c;   m->v[0][2] = s;   m->v[2][0] = -s;   m->v[2][2] = c;}/* get_z_rotate_matrix: *  Constructs a 3d transformation matrix, which will rotate points around  *  the z axis by the specified amount (given in the Allegro fixed point,  *  256 degrees to a circle format). */void get_z_rotate_matrix(MATRIX *m, fixed r){   fixed c = fcos(r);   fixed s = fsin(r);   *m = identity_matrix;   m->v[0][0] = c;   m->v[0][1] = -s;   m->v[1][0] = s;   m->v[1][1] = c;}/* get_z_rotate_matrix_f: *  Floating point version of get_z_rotate_matrix(). */void get_z_rotate_matrix_f(MATRIX_f *m, float r){   float c = floatcos(r);   float s = floatsin(r);   *m = identity_matrix_f;   m->v[0][0] = c;   m->v[0][1] = -s;   m->v[1][0] = s;   m->v[1][1] = c;}/* magical formulae for constructing rotation matrices */#define MAKE_ROTATION(x, y, z)                  \   fixed sin_x = fsin(x);                       \   fixed cos_x = fcos(x);                       \						\   fixed sin_y = fsin(y);                       \   fixed cos_y = fcos(y);                       \						\   fixed sin_z = fsin(z);                       \   fixed cos_z = fcos(z);                       \						\   fixed sinx_siny = fmul(sin_x, sin_y);        \   fixed cosx_siny = fmul(cos_x, sin_y);#define MAKE_ROTATION_f(x, y, z)                \   float sin_x = floatsin(x);                   \   float cos_x = floatcos(x);                   \						\   float sin_y = floatsin(y);                   \   float cos_y = floatcos(y);                   \						\   float sin_z = floatsin(z);                   \   float cos_z = floatcos(z);                   \						\   float sinx_siny = sin_x * sin_y;             \   float cosx_siny = cos_x * sin_y;#define R00 (fmul(cos_y, cos_z))#define R10 (fmul(sinx_siny, cos_z) - fmul(cos_x, sin_z))#define R20 (fmul(cosx_siny, cos_z) + fmul(sin_x, sin_z))#define R01 (fmul(cos_y, sin_z))#define R11 (fmul(sinx_siny, sin_z) + fmul(cos_x, cos_z))#define R21 (fmul(cosx_siny, sin_z) - fmul(sin_x, cos_z))#define R02 (-sin_y)#define R12 (fmul(sin_x, cos_y))#define R22 (fmul(cos_x, cos_y))#define R00_f (cos_y * cos_z)#define R10_f ((sinx_siny * cos_z) - (cos_x * sin_z))#define R20_f ((cosx_siny * cos_z) + (sin_x * sin_z))#define R01_f (cos_y * sin_z)#define R11_f ((sinx_siny * sin_z) + (cos_x * cos_z))#define R21_f ((cosx_siny * sin_z) - (sin_x * cos_z))#define R02_f (-sin_y)#define R12_f (sin_x * cos_y)#define R22_f (cos_x * cos_y)/* get_rotation_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). */void get_rotation_matrix(MATRIX *m, fixed x, fixed y, fixed z){   MAKE_ROTATION(x, y, z);   m->v[0][0] = R00;   m->v[0][1] = R01;   m->v[0][2] = R02;   m->v[1][0] = R10;   m->v[1][1] = R11;   m->v[1][2] = R12;   m->v[2][0] = R20;   m->v[2][1] = R21;   m->v[2][2] = R22;   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_rotation_matrix_f: *  Floating point version of get_rotation_matrix(). */void get_rotation_matrix_f(MATRIX_f *m, float x, float y, float z){   MAKE_ROTATION_f(x, y, z);   m->v[0][0] = R00_f;   m->v[0][1] = R01_f;   m->v[0][2] = R02_f;   m->v[1][0] = R10_f;   m->v[1][1] = R11_f;   m->v[1][2] = R12_f;   m->v[2][0] = R20_f;   m->v[2][1] = R21_f;   m->v[2][2] = R22_f;   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_align_matrix: *  Aligns a matrix along an arbitrary coordinate system. */void get_align_matrix(MATRIX *m, fixed xfront, fixed yfront, fixed zfront, fixed xup, fixed yup, fixed zup){   fixed xright, yright, zright;   normalize_vector(&xfront, &yfront, &zfront);   normalize_vector(&xup, &yup, &zup);   cross_product(xfront, yfront, zfront, xup, yup, zup, &xright, &yright, &zright);   cross_product(xright, yright, zright, xfront, yfront, zfront, &xup, &yup, &zup);   m->v[0][0] = xright;    m->v[0][1] = xup;    m->v[0][2] = xfront;    m->v[1][0] = yright;   m->v[1][1] = yup;   m->v[1][2] = yfront;   m->v[2][0] = zright;   m->v[2][1] = zup;   m->v[2][2] = zfront;   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_align_matrix_f: *  Floating point version of get_align_matrix(). */void get_align_matrix_f(MATRIX_f *m, float xfront, float yfront, float zfront, float xup, float yup, float zup){   float xright, yright, zright;   normalize_vector_f(&xfront, &yfront, &zfront);   normalize_vector_f(&xup, &yup, &zup);   cross_product_f(xfront, yfront, zfront, xup, yup, zup, &xright, &yright, &zright);   cross_product_f(xright, yright, zright, xfront, yfront, zfront, &xup, &yup, &zup);   m->v[0][0] = xright;    m->v[0][1] = xup;    m->v[0][2] = xfront;    m->v[1][0] = yright;   m->v[1][1] = yup;   m->v[1][2] = yfront;   m->v[2][0] = zright;   m->v[2][1] = zup;   m->v[2][2] = zfront;   m->t[0] = m->t[1] = m->t[2] = 0;}/* get_vector_rotation_matrix: *  Constructs a 3d transformation matrix, which will rotate points around *  the specified x,y,z vector by the specified angle (given in the Allegro  *  fixed point, 256 degrees to a circle format), in a clockwise direction. */void get_vector_rotation_matrix(MATRIX *m, fixed x, fixed y, fixed z, fixed a){

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲视频一区在线观看| 国产91精品入口| 亚洲黄色小说网站| 中文字幕在线一区免费| 久久久久九九视频| 国产色一区二区| 国产亚洲欧美日韩日本| 欧美一级专区免费大片| 日韩欧美一二三| 国产亚洲污的网站| 中文字幕中文字幕在线一区 | 最新高清无码专区| 亚洲日本一区二区三区| 亚洲一二三区在线观看| 日本v片在线高清不卡在线观看| 亚洲第一久久影院| 麻豆91精品91久久久的内涵| 精品亚洲国内自在自线福利| 成人一区在线观看| 在线观看www91| 日韩亚洲国产中文字幕欧美| 久久久久国产精品免费免费搜索| 亚洲国产精品ⅴa在线观看| 亚洲欧美另类久久久精品| 亚洲国产精品人人做人人爽| 久久精品噜噜噜成人av农村| 粉嫩一区二区三区在线看| 91国内精品野花午夜精品| 欧美精品一二三| 国产人成一区二区三区影院| 亚洲制服丝袜一区| 久草这里只有精品视频| 色综合久久天天| 日韩视频免费观看高清完整版| 国产亚洲va综合人人澡精品| 亚洲自拍偷拍麻豆| 国产激情一区二区三区四区| 91精品1区2区| 国产女主播在线一区二区| 一区二区三区四区五区视频在线观看 | 日韩女优av电影| 国产精品每日更新| 日本成人在线网站| 99精品久久久久久| 精品1区2区在线观看| 亚洲一区二区三区四区在线免费观看 | 亚洲一区电影777| 国产一区二区美女| 欧美日韩精品三区| 中文字幕亚洲成人| 国产乱一区二区| 欧美高清精品3d| 日韩美女啊v在线免费观看| 久久精品免费看| 91精品福利在线| 成人欧美一区二区三区| 五月天精品一区二区三区| 91麻豆123| 国产精品久久午夜夜伦鲁鲁| 国产一区二区伦理| 日韩午夜精品视频| 日韩av高清在线观看| 欧美最猛性xxxxx直播| 亚洲视频一区二区在线观看| 国产精品一二三四| 亚洲精品一区二区三区四区高清| 日韩精品视频网| 欧美日韩免费一区二区三区视频| 18欧美亚洲精品| 国产91在线观看丝袜| 欧美国产激情二区三区 | 色欧美日韩亚洲| 国产精品人成在线观看免费| 国产成人精品午夜视频免费| 精品国产电影一区二区| 老司机一区二区| 这里只有精品视频在线观看| 日韩av不卡在线观看| 91精品国产高清一区二区三区| 午夜精品久久久久影视| 91精品国产色综合久久久蜜香臀| 午夜精品久久久久久不卡8050| 色菇凉天天综合网| 亚洲一区在线视频| 欧美日韩大陆在线| 视频一区二区不卡| 欧美一区在线视频| 黑人巨大精品欧美黑白配亚洲| 26uuu亚洲婷婷狠狠天堂| 国产98色在线|日韩| 亚洲四区在线观看| 欧美丰满嫩嫩电影| 狠狠狠色丁香婷婷综合激情| 中文字幕一区在线观看视频| 在线观看一区日韩| 免费视频一区二区| 久久久精品欧美丰满| 99精品视频一区| 亚洲成人在线免费| 精品国产免费一区二区三区四区| 国产成人av一区二区三区在线 | 久久毛片高清国产| 99久久精品一区| 亚洲高清一区二区三区| 正在播放一区二区| 国产黄色精品网站| 亚洲免费资源在线播放| 欧美一区日韩一区| 成人av免费在线| 调教+趴+乳夹+国产+精品| 2023国产精品| 欧美三级日本三级少妇99| 国产精品18久久久久久久久| 亚洲一区二区五区| 亚洲国产精品99久久久久久久久| 欧美四级电影在线观看| 高清不卡在线观看av| 日本中文字幕一区| 亚洲欧美日韩系列| 久久久91精品国产一区二区三区| 91视频观看视频| 国产精品亚洲成人| 肉肉av福利一精品导航| 亚洲免费资源在线播放| 国产三级一区二区| 日韩一区二区三区视频| 在线免费精品视频| 国产 欧美在线| 国产在线播放一区| 青青草原综合久久大伊人精品| 亚洲精品成人a在线观看| 国产视频一区二区在线| 欧美电视剧免费全集观看| 欧美日韩一区二区在线观看视频| 成人黄色一级视频| 国内精品国产三级国产a久久| 天天av天天翘天天综合网色鬼国产| 日韩理论片一区二区| 欧美韩国日本综合| 国产三区在线成人av| 欧美成人video| 91精品国产综合久久小美女| 欧美调教femdomvk| 欧美三电影在线| 欧美无砖砖区免费| 欧美日韩成人激情| 在线观看亚洲a| 欧美私模裸体表演在线观看| 在线亚洲欧美专区二区| 色视频欧美一区二区三区| 91在线视频网址| 在线免费观看日本欧美| 在线免费一区三区| 欧美日韩激情在线| 欧美一区在线视频| 欧美精品一区二区三区蜜臀| 久久久精品综合| 中文字幕日韩一区| 亚洲日韩欧美一区二区在线| 樱花影视一区二区| 亚洲福利电影网| 免费观看30秒视频久久| 国产在线国偷精品产拍免费yy| 国产乱人伦偷精品视频不卡| 成人午夜私人影院| 99久久er热在这里只有精品15| 97se亚洲国产综合在线| 在线精品观看国产| 日韩精品中午字幕| 国产精品天天摸av网| 一区二区三区丝袜| 日韩精品久久理论片| 久久www免费人成看片高清| 风间由美性色一区二区三区| 99精品视频在线观看| 欧美精品日日鲁夜夜添| 久久蜜桃一区二区| 一区二区在线观看免费| 蜜臀精品一区二区三区在线观看| 国产综合久久久久久鬼色| 99精品久久只有精品| 欧美一级欧美一级在线播放| 中文av一区二区| 同产精品九九九| 粉嫩aⅴ一区二区三区四区五区 | 国产亚洲婷婷免费| 一区二区三区四区在线| 国精产品一区一区三区mba桃花 | 免费一级欧美片在线观看| 成人av在线一区二区| 欧美一区二区福利在线| 国产精品久久一卡二卡| 久久精品99久久久| 日本丶国产丶欧美色综合| 26uuu亚洲婷婷狠狠天堂| 亚洲成在人线免费| www.欧美亚洲| 久久久久久久久久久久久久久99| 亚洲精品中文在线观看| 国产99精品国产|