亚洲欧美第一页_禁久久精品乱码_粉嫩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精品福利在线一区二区三区| 国产精品久久久久永久免费观看 | 日韩一区二区三区在线视频| 国产精品久久夜| 国产精品一区免费视频| 欧美一级二级三级蜜桃| 亚洲一区在线观看视频| 91网上在线视频| 欧美激情一区二区三区蜜桃视频| 麻豆成人综合网| 欧美一区日韩一区| 午夜精品福利在线| 欧美亚洲动漫精品| 亚洲人吸女人奶水| 99精品视频中文字幕| 欧美国产日韩在线观看| 国产精品一区二区久久精品爱涩| 欧美一级高清片| 美女视频黄久久| 91精品婷婷国产综合久久竹菊| 亚洲一区免费视频| 欧亚一区二区三区| 亚洲欧美偷拍另类a∨色屁股| 99视频一区二区| 自拍偷拍欧美激情| 99久精品国产| 亚洲激情自拍视频| 91国偷自产一区二区三区成为亚洲经典| 国产精品网曝门| 99精品久久只有精品| 亚洲人吸女人奶水| 在线观看国产91| 日韩av一区二区三区四区| 日韩欧美久久久| 国产精品一二三四区| 中文字幕av一区 二区| 成人精品gif动图一区| 亚洲婷婷在线视频| 欧美少妇xxx| 午夜精品久久久久久久久久| 91精品国产手机| 国产剧情在线观看一区二区| 中文字幕乱码日本亚洲一区二区| 不卡的av网站| 亚洲成人一区在线| 欧美一卡二卡在线观看| 国产在线一区二区综合免费视频| 国产精品美女久久久久久久久久久| www.视频一区| 日韩精品三区四区| 久久精品人人做人人爽人人| 91网站在线播放| 奇米综合一区二区三区精品视频| 精品国产区一区| 91小视频免费观看| 欧美96一区二区免费视频| 亚洲国产精品精华液ab| 色欧美片视频在线观看| 青青草国产精品97视觉盛宴| 中文字幕欧美日韩一区| 欧美日韩和欧美的一区二区| 国产一区中文字幕| 亚洲一二三四在线| 久久精品免视看| 91福利精品第一导航| 久久精品国产亚洲一区二区三区| 国产精品传媒视频| 日韩美女天天操| 91福利在线观看| 国产成人免费视| 婷婷六月综合网| 亚洲人快播电影网| 久久久久国产精品免费免费搜索| 欧洲亚洲国产日韩| 成人性生交大合| 麻豆国产欧美日韩综合精品二区| 亚洲麻豆国产自偷在线| 久久久久9999亚洲精品| 这里只有精品99re| 91年精品国产| 国产成人小视频| 日韩高清欧美激情| 亚洲精品国久久99热| 中文字幕乱码一区二区免费| 日韩精品一区二区三区三区免费| 欧洲av在线精品| 成人成人成人在线视频| 国内精品伊人久久久久影院对白| 亚洲h精品动漫在线观看| 欧美国产欧美亚州国产日韩mv天天看完整| 欧美日本在线看| 在线观看亚洲专区| 99精品视频免费在线观看| 国产一区91精品张津瑜| 蜜臂av日日欢夜夜爽一区| 亚洲h动漫在线| 亚洲国产精品久久一线不卡| 日韩伦理电影网| 中文字幕亚洲电影| 国产精品视频一二| 国产精品人人做人人爽人人添| xf在线a精品一区二区视频网站| 欧美高清www午色夜在线视频| 欧美伊人精品成人久久综合97 | 国产精品中文字幕日韩精品| 久久成人免费日本黄色| 免费人成在线不卡| 美女网站视频久久| 捆绑变态av一区二区三区| 日本欧美一区二区三区| 免费不卡在线视频| 久久精品国产77777蜜臀| 麻豆精品在线看| 狠狠色丁香九九婷婷综合五月| 蜜臀av一区二区| 久久99国产精品尤物| 国产一区 二区| 波多野结衣精品在线| jlzzjlzz亚洲女人18| 在线免费观看日韩欧美| 欧洲av在线精品| 欧美一区二区不卡视频| 久久久午夜电影| 国产精品久久久99| 尤物视频一区二区| 日本最新不卡在线| 韩国成人在线视频| 成人av影视在线观看| 91搞黄在线观看| 日韩午夜在线观看视频| 久久久久综合网| 亚洲免费观看在线观看| 日韩精品福利网| 国产精品亚洲视频| 一本在线高清不卡dvd| 日韩一区二区三区在线| 精品99999| 亚洲少妇中出一区| 蜜臀av在线播放一区二区三区| 国产精品一区久久久久| 91国产免费看| 欧美电影免费观看高清完整版在线| 中文字幕av不卡| 日韩av网站免费在线| 国产成人免费视频一区| 欧美日韩亚洲综合在线| 国产欧美日韩精品在线| 午夜精品久久久久| 成人丝袜18视频在线观看| 欧美日韩你懂的| 国产欧美一区二区精品性色超碰| 一级中文字幕一区二区| 精品一区二区三区香蕉蜜桃| 91看片淫黄大片一级在线观看| 日韩一区二区三区三四区视频在线观看 | 99久久99久久综合| 欧美成人官网二区| 亚洲最大成人综合| 国产精品一区二区果冻传媒| 欧美精品一二三四| 国产精品丝袜一区| 激情文学综合网| 欧美日本精品一区二区三区| 日本一区二区免费在线| 青娱乐精品视频在线| 在线免费亚洲电影| 国产日产欧美一区| 久久99精品国产91久久来源| 欧美综合久久久| 成人免费在线观看入口| 国产一区 二区| 欧美成人一区二区三区在线观看| 亚洲一区二区三区四区不卡| hitomi一区二区三区精品| 精品久久人人做人人爰| 亚洲成av人片观看| 一本到不卡免费一区二区| 国产精品久久久久久久岛一牛影视| 久久精品二区亚洲w码| 欧美肥妇free| 亚洲成人av中文| 欧美午夜影院一区| 亚洲天堂中文字幕| 91亚洲精品久久久蜜桃| 中文字幕亚洲在| heyzo一本久久综合| 中文字幕av不卡| 岛国精品一区二区| 国产欧美一区二区三区网站| 国产宾馆实践打屁股91| 久久久精品综合| 国产成人一区二区精品非洲| 欧美韩日一区二区三区|