⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 draw_holder.c

📁 学习c++必备
💻 C
📖 第 1 页 / 共 4 页
字号:
/* * (c) Copyright 1993, Silicon Graphics, Inc. * ALL RIGHTS RESERVED  * Permission to use, copy, modify, and distribute this software for  * any purpose and without fee is hereby granted, provided that the above * copyright notice appear in all copies and that both the copyright notice * and this permission notice appear in supporting documentation, and that  * the name of Silicon Graphics, Inc. not be used in advertising * or publicity pertaining to distribution of the software without specific, * written prior permission.  * * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS" * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT, * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION, * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE. *  * US Government Users Restricted Rights  * Use, duplication, or disclosure by the Government is subject to * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph * (c)(1)(ii) of the Rights in Technical Data and Computer Software * clause at DFARS 252.227-7013 and/or in similar or successor * clauses in the FAR or the DOD or NASA FAR Supplement. * Unpublished-- rights reserved under the copyright laws of the * United States.  Contractor/manufacturer is Silicon Graphics, * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311. * * OpenGL(TM) is a trademark of Silicon Graphics, Inc. */#include <GL/glut.h>#include "objects.h"float bn[5][3] = {	{-1.0, 0.0, 0.0},	{0.0, 1.0, 0.0},	{1.0, 0.0, 0.0},	{0.0, -1.0, 0.0},	{0.0, 0.0, 1.0},};float bp[4][8][3] = {    {   	{-14.000000, -14.000000, 0.000000},	{-14.000000, -14.000000, 4.000000},	{-14.000000, 14.000000, 0.000000},	{-14.000000, 14.000000, 4.000000},	{14.000000, 14.000000, 0.000000},	{14.000000, 14.000000, 4.000000},	{14.000000, -14.000000, 0.000000},	{14.000000, -14.000000, 4.000000},    },    {	{-12.000000, -12.000000, 4.000000},	{-12.000000, -12.000000, 8.000000},	{-12.000000, 12.000000, 4.000000},	{-12.000000, 12.000000, 8.000000},	{12.000000, 12.000000, 4.000000},	{12.000000, 12.000000, 8.000000},	{12.000000, -12.000000, 4.000000},	{12.000000, -12.000000, 8.000000},    },    {	{-10.000000, -10.000000, 8.000000},	{-10.000000, -10.000000, 12.000000},	{-10.000000, 10.000000, 8.000000},	{-10.000000, 10.000000, 12.000000},	{10.000000, 10.000000, 8.000000},	{10.000000, 10.000000, 12.000000},	{10.000000, -10.000000, 8.000000},	{10.000000, -10.000000, 12.000000},    },    {	{-8.000000, -8.000000, 12.000000},	{-8.000000, -8.000000, 8.000000},	{-8.000000, 8.000000, 12.000000},	{-8.000000, 8.000000, 8.000000},	{8.000000, 8.000000, 12.000000},	{8.000000, 8.000000, 8.000000},	{8.000000, -8.000000, 12.000000},	{8.000000, -8.000000, 8.000000},    },};float tp[12][21][3] = {     {	{10.000000, 0.000000, 1.000000},	{9.510565, -3.090170, 1.000000},	{8.090170, -5.877852, 1.000000},	{5.877852, -8.090170, 1.000000},	{3.090170, -9.510565, 1.000000},	{0.000000, -10.000000, 1.000000},	{-3.090170, -9.510565, 1.000000},	{-5.877852, -8.090170, 1.000000},	{-8.090170, -5.877852, 1.000000},	{-9.510565, -3.090170, 1.000000},	{-10.000000, 0.000000, 1.000000},	{-9.510565, 3.090170, 1.000000},	{-8.090170, 5.877852, 1.000000},	{-5.877852, 8.090170, 1.000000},	{-3.090170, 9.510565, 1.000000},	{0.000000, 10.000000, 1.000000},	{3.090170, 9.510565, 1.000000},	{5.877852, 8.090170, 1.000000},	{8.090170, 5.877852, 1.000000},	{9.510565, 3.090170, 1.000000},	{10.000000, 0.000000, 1.000000},    },     {	{10.540641, 0.000000, 0.841254},	{10.024745, -3.257237, 0.841254},	{8.527557, -6.195633, 0.841254},	{6.195633, -8.527557, 0.841254},	{3.257237, -10.024745, 0.841254},	{0.000000, -10.540641, 0.841254},	{-3.257237, -10.024745, 0.841254},	{-6.195633, -8.527557, 0.841254},	{-8.527557, -6.195633, 0.841254},	{-10.024745, -3.257237, 0.841254},	{-10.540641, 0.000000, 0.841254},	{-10.024745, 3.257237, 0.841254},	{-8.527557, 6.195633, 0.841254},	{-6.195633, 8.527557, 0.841254},	{-3.257237, 10.024745, 0.841254},	{0.000000, 10.540641, 0.841254},	{3.257237, 10.024745, 0.841254},	{6.195633, 8.527557, 0.841254},	{8.527557, 6.195633, 0.841254},	{10.024745, 3.257237, 0.841254},	{10.540641, 0.000000, 0.841254},    },     {	{10.909632, 0.000000, 0.415415},	{10.375676, -3.371262, 0.415415},	{8.826077, -6.412521, 0.415415},	{6.412521, -8.826077, 0.415415},	{3.371262, -10.375676, 0.415415},	{0.000000, -10.909632, 0.415415},	{-3.371262, -10.375676, 0.415415},	{-6.412521, -8.826077, 0.415415},	{-8.826077, -6.412521, 0.415415},	{-10.375676, -3.371262, 0.415415},	{-10.909632, 0.000000, 0.415415},	{-10.375676, 3.371262, 0.415415},	{-8.826077, 6.412521, 0.415415},	{-6.412521, 8.826077, 0.415415},	{-3.371262, 10.375676, 0.415415},	{0.000000, 10.909632, 0.415415},	{3.371262, 10.375676, 0.415415},	{6.412521, 8.826077, 0.415415},	{8.826077, 6.412521, 0.415415},	{10.375676, 3.371262, 0.415415},	{10.909632, 0.000000, 0.415415},    },     {	{10.989821, 0.000000, -0.142315},	{10.451941, -3.396042, -0.142315},	{8.890952, -6.459655, -0.142315},	{6.459655, -8.890952, -0.142315},	{3.396042, -10.451941, -0.142315},	{0.000000, -10.989821, -0.142315},	{-3.396042, -10.451941, -0.142315},	{-6.459655, -8.890952, -0.142315},	{-8.890952, -6.459655, -0.142315},	{-10.451941, -3.396042, -0.142315},	{-10.989821, 0.000000, -0.142315},	{-10.451941, 3.396042, -0.142315},	{-8.890952, 6.459655, -0.142315},	{-6.459655, 8.890952, -0.142315},	{-3.396042, 10.451941, -0.142315},	{0.000000, 10.989821, -0.142315},	{3.396042, 10.451941, -0.142315},	{6.459655, 8.890952, -0.142315},	{8.890952, 6.459655, -0.142315},	{10.451941, 3.396042, -0.142315},	{10.989821, 0.000000, -0.142315},    },     {	{10.755750, 0.000000, -0.654861},	{10.229325, -3.323709, -0.654861},	{8.701584, -6.322071, -0.654861},	{6.322071, -8.701584, -0.654861},	{3.323709, -10.229325, -0.654861},	{0.000000, -10.755750, -0.654861},	{-3.323709, -10.229325, -0.654861},	{-6.322071, -8.701584, -0.654861},	{-8.701584, -6.322071, -0.654861},	{-10.229325, -3.323709, -0.654861},	{-10.755750, 0.000000, -0.654861},	{-10.229325, 3.323709, -0.654861},	{-8.701584, 6.322071, -0.654861},	{-6.322071, 8.701584, -0.654861},	{-3.323709, 10.229325, -0.654861},	{0.000000, 10.755750, -0.654861},	{3.323709, 10.229325, -0.654861},	{6.322071, 8.701584, -0.654861},	{8.701584, 6.322071, -0.654861},	{10.229325, 3.323709, -0.654861},	{10.755750, 0.000000, -0.654861},    },     {	{10.281733, 0.000000, -0.959493},	{9.778509, -3.177230, -0.959493},	{8.318096, -6.043451, -0.959493},	{6.043451, -8.318096, -0.959493},	{3.177230, -9.778509, -0.959493},	{0.000000, -10.281733, -0.959493},	{-3.177230, -9.778509, -0.959493},	{-6.043451, -8.318096, -0.959493},	{-8.318096, -6.043451, -0.959493},	{-9.778509, -3.177230, -0.959493},	{-10.281733, 0.000000, -0.959493},	{-9.778509, 3.177230, -0.959493},	{-8.318096, 6.043451, -0.959493},	{-6.043451, 8.318096, -0.959493},	{-3.177230, 9.778509, -0.959493},	{0.000000, 10.281733, -0.959493},	{3.177230, 9.778509, -0.959493},	{6.043451, 8.318096, -0.959493},	{8.318096, 6.043451, -0.959493},	{9.778509, 3.177230, -0.959493},	{10.281733, 0.000000, -0.959493},    },     {	{9.718267, 0.000000, -0.959493},	{9.242621, -3.003110, -0.959493},	{7.862244, -5.712255, -0.959493},	{5.712255, -7.862244, -0.959493},	{3.003110, -9.242621, -0.959493},	{0.000000, -9.718267, -0.959493},	{-3.003110, -9.242621, -0.959493},	{-5.712255, -7.862244, -0.959493},	{-7.862244, -5.712255, -0.959493},	{-9.242621, -3.003110, -0.959493},	{-9.718267, 0.000000, -0.959493},	{-9.242621, 3.003110, -0.959493},	{-7.862244, 5.712255, -0.959493},	{-5.712255, 7.862244, -0.959493},	{-3.003110, 9.242621, -0.959493},	{0.000000, 9.718267, -0.959493},	{3.003110, 9.242621, -0.959493},	{5.712255, 7.862244, -0.959493},	{7.862244, 5.712255, -0.959493},	{9.242621, 3.003110, -0.959493},	{9.718267, 0.000000, -0.959493},    },     {	{9.244250, 0.000000, -0.654861},	{8.791805, -2.856631, -0.654861},	{7.478756, -5.433634, -0.654861},	{5.433634, -7.478756, -0.654861},	{2.856631, -8.791805, -0.654861},	{0.000000, -9.244250, -0.654861},	{-2.856631, -8.791805, -0.654861},	{-5.433634, -7.478756, -0.654861},	{-7.478756, -5.433634, -0.654861},	{-8.791805, -2.856631, -0.654861},	{-9.244250, 0.000000, -0.654861},	{-8.791805, 2.856631, -0.654861},	{-7.478756, 5.433634, -0.654861},	{-5.433634, 7.478756, -0.654861},	{-2.856631, 8.791805, -0.654861},	{0.000000, 9.244250, -0.654861},	{2.856631, 8.791805, -0.654861},	{5.433634, 7.478756, -0.654861},	{7.478756, 5.433634, -0.654861},	{8.791805, 2.856631, -0.654861},	{9.244250, 0.000000, -0.654861},    },     {	{9.010179, 0.000000, -0.142315},	{8.569189, -2.784298, -0.142315},	{7.289388, -5.296050, -0.142315},	{5.296050, -7.289388, -0.142315},	{2.784298, -8.569189, -0.142315},	{0.000000, -9.010179, -0.142315},	{-2.784298, -8.569189, -0.142315},	{-5.296050, -7.289388, -0.142315},	{-7.289388, -5.296050, -0.142315},	{-8.569189, -2.784298, -0.142315},	{-9.010179, 0.000000, -0.142315},	{-8.569189, 2.784298, -0.142315},	{-7.289388, 5.296050, -0.142315},	{-5.296050, 7.289388, -0.142315},	{-2.784298, 8.569189, -0.142315},	{0.000000, 9.010179, -0.142315},	{2.784298, 8.569189, -0.142315},	{5.296050, 7.289388, -0.142315},	{7.289388, 5.296050, -0.142315},	{8.569189, 2.784298, -0.142315},	{9.010179, 0.000000, -0.142315},    },     {	{9.090367, 0.000000, 0.415414},	{8.645453, -2.809078, 0.415414},	{7.354262, -5.343184, 0.415414},	{5.343184, -7.354262, 0.415414},	{2.809078, -8.645453, 0.415414},	{0.000000, -9.090367, 0.415414},	{-2.809078, -8.645453, 0.415414},	{-5.343184, -7.354262, 0.415414},	{-7.354262, -5.343184, 0.415414},	{-8.645453, -2.809078, 0.415414},	{-9.090367, 0.000000, 0.415414},	{-8.645453, 2.809078, 0.415414},	{-7.354262, 5.343184, 0.415414},	{-5.343184, 7.354262, 0.415414},	{-2.809078, 8.645453, 0.415414},	{0.000000, 9.090367, 0.415414},	{2.809078, 8.645453, 0.415414},	{5.343184, 7.354262, 0.415414},	{7.354262, 5.343184, 0.415414},	{8.645453, 2.809078, 0.415414},	{9.090367, 0.000000, 0.415414},    },     {	{9.459358, 0.000000, 0.841253},	{8.996385, -2.923103, 0.841253},	{7.652781, -5.560071, 0.841253},	{5.560071, -7.652781, 0.841253},	{2.923103, -8.996385, 0.841253},	{0.000000, -9.459358, 0.841253},	{-2.923103, -8.996385, 0.841253},

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -