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

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

?? math3d.c

?? miniucgui1.30版本的源碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*** $Id: math3d.c,v 1.3 2003/09/04 03:46:47 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"#include "fixedmath.h"#ifdef _MATH_3D#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一区二区三区免费野_久草精品视频
久久久高清一区二区三区| 欧美在线观看视频一区二区三区| 日韩av电影一区| 国产美女娇喘av呻吟久久| 成人激情免费网站| 国产欧美视频在线观看| 狠狠色丁香久久婷婷综合_中| 国产91在线观看丝袜| 精品免费一区二区三区| 免费成人在线播放| 日韩视频在线观看一区二区| 日本美女视频一区二区| 欧美色网一区二区| 天天色综合成人网| 欧美大片在线观看| 成人免费视频视频在线观看免费 | 欧美性色黄大片| 国产精品美女久久久久高潮| av动漫一区二区| 亚洲激情一二三区| 91麻豆精品国产自产在线 | 国内精品写真在线观看| 色婷婷一区二区三区四区| 国产女主播一区| 国产电影一区二区三区| 亚洲综合清纯丝袜自拍| 色嗨嗨av一区二区三区| 亚洲一二三四区| 亚洲精品一区二区三区99| 91在线视频官网| 日本中文一区二区三区| 自拍视频在线观看一区二区| 国产一区欧美二区| 91国模大尺度私拍在线视频| 26uuu亚洲综合色欧美| 95精品视频在线| 亚洲网友自拍偷拍| 久久色中文字幕| 不卡一区二区中文字幕| 老司机午夜精品| 丝袜美腿成人在线| 一区二区三区精品久久久| 欧美精品在线一区二区| 国产一区中文字幕| 丝袜美腿一区二区三区| 亚洲欧洲成人精品av97| 精品乱人伦一区二区三区| 欧美在线小视频| 一本在线高清不卡dvd| 国产激情一区二区三区桃花岛亚洲| 久久久精品天堂| 欧美性猛片aaaaaaa做受| 粉嫩久久99精品久久久久久夜| 一区二区三区在线视频免费| 欧美日本一区二区三区四区| 激情偷乱视频一区二区三区| 久久精品72免费观看| 国产精品 日产精品 欧美精品| 亚洲人123区| 国产精品国产自产拍高清av| 欧美日高清视频| 欧美大片在线观看| 国产精品天天摸av网| 国产欧美精品国产国产专区| 亚洲欧美一区二区三区国产精品| 久久午夜免费电影| 欧美变态口味重另类| 精品国产欧美一区二区| 精品国产1区2区3区| 国产欧美日韩另类视频免费观看| 国产精品美女久久久久aⅴ| 国产精品欧美综合在线| 亚洲婷婷综合色高清在线| 欧美va亚洲va国产综合| 亚洲国产精品天堂| 男人的天堂亚洲一区| 国产精品一级片| 在线亚洲+欧美+日本专区| 精品噜噜噜噜久久久久久久久试看| 国产精品三级电影| 久久99深爱久久99精品| 波多野结衣在线aⅴ中文字幕不卡| 678五月天丁香亚洲综合网| 国产91精品一区二区| 99久久综合精品| 中文字幕av不卡| 国产一区二区三区电影在线观看| 日本电影欧美片| 日韩一级高清毛片| 欧美aaaaa成人免费观看视频| 欧美精品粉嫩高潮一区二区| 一区二区三区中文字幕| 色噜噜狠狠一区二区三区果冻| 国产喂奶挤奶一区二区三区| 久久99国产精品尤物| 国产日产欧美一区二区视频| 久久精品国产色蜜蜜麻豆| 7777精品久久久大香线蕉| 日韩一区精品字幕| 欧美成人欧美edvon| 国产成人在线视频播放| 日本一区二区三区电影| 99久久精品国产网站| 亚洲精品国产无天堂网2021| 9191久久久久久久久久久| 狠狠色丁香久久婷婷综| 国产欧美一区二区三区鸳鸯浴| 高清国产一区二区| 天天av天天翘天天综合网色鬼国产| 7777精品伊人久久久大香线蕉超级流畅| 全国精品久久少妇| 亚洲欧美韩国综合色| 精品黑人一区二区三区久久 | 欧美精品第1页| 国产精品一级片| 久久国产视频网| 亚洲国产欧美日韩另类综合| 337p粉嫩大胆噜噜噜噜噜91av| 在线一区二区观看| 99综合电影在线视频| 国内精品在线播放| 玖玖九九国产精品| 婷婷国产在线综合| 亚洲第一久久影院| 国产亚洲欧美激情| 日韩午夜激情av| 欧美视频中文字幕| 色综合天天综合网天天狠天天| 老色鬼精品视频在线观看播放| 亚洲一区二区视频在线| 久久久综合九色合综国产精品| 欧美日韩国产综合一区二区| 成人在线视频一区| 99国内精品久久| youjizz久久| 国产乱码精品一区二区三区av | 美女性感视频久久| 亚洲国产视频在线| 免费观看30秒视频久久| 亚洲精品国产成人久久av盗摄| 国产精品美女www爽爽爽| 亚洲视频网在线直播| 亚洲国产综合在线| 精品午夜久久福利影院| 成人黄色777网| 欧美三级在线播放| 2023国产一二三区日本精品2022| 日韩一级大片在线| 久久久久免费观看| 亚洲女性喷水在线观看一区| 日韩va欧美va亚洲va久久| 久久99国产精品免费| 高清日韩电视剧大全免费| 99久久久无码国产精品| 欧美色偷偷大香| 国产婷婷精品av在线| 亚洲6080在线| 在线精品亚洲一区二区不卡| 精品国产乱码久久久久久久| 日韩欧美国产一二三区| 国产精品视频麻豆| 久久97超碰国产精品超碰| 欧美视频第二页| 亚洲欧洲综合另类在线| 美女视频黄久久| 精品视频免费看| 亚洲成人免费视| 日本高清成人免费播放| 国产精品成人免费| 成人免费视频国产在线观看| 在线播放日韩导航| 亚洲成人免费在线| 91网上在线视频| 亚洲欧美日韩在线| 欧美视频第二页| 亚洲一级二级三级在线免费观看| 91蝌蚪porny九色| 亚洲欧美日韩综合aⅴ视频| 成人一区二区三区视频在线观看 | 日韩精品一区国产麻豆| 日韩成人dvd| 日韩精品一区国产麻豆| 国产成人在线视频免费播放| 国产欧美一区二区三区网站| 高潮精品一区videoshd| 亚洲最大色网站| 欧美一二区视频| 国产成人精品一区二区三区四区 | 丁香五精品蜜臀久久久久99网站| 中文字幕第一区二区| 亚洲国产高清在线| 国产成人精品免费在线| 一级精品视频在线观看宜春院| 欧美日韩日日夜夜| eeuss鲁片一区二区三区在线观看| 中文字幕一区二| 精品久久久久久综合日本欧美| 欧美四级电影网| 不卡一区二区三区四区| 国产精品一区二区免费不卡|