资源简介
OpenGL绘制3D机器人,可以通过键盘控制手脚、头旋转移动
代码片段和文件信息
/*
* Copyright (c) 1993-2003 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.
* 1500 Crittenden Lane
* Mountain View CA 94043
* United State of America
*
* OpenGL(R) is a registered trademark of Silicon Graphics Inc.
*/
/*
* robot.c
* This program shows how to composite modeling transformations
* to draw translated and rotated hierarchical models.
* Interaction: pressing the s and e keys (shoulder and elbow)
* alters the rotation of the robot arm.
*/
#include
#include “glut.h“
static int shoulder = 0 elbow = 0 head = 0 leg = 0 foot = 0;
void init(void)
{
glClearColor (0.0 0.0 0.0 0.0);
glShadeModel (GL_FLAT);
}
void display(void)
{
glClear (GL_COLOR_BUFFER_BIT);
glPushMatrix();
glPushMatrix(); //It‘s body
glScalef (1.6 2.0 1.0);
glutWireCube (1.0);
glPopMatrix();
glPushMatrix();
glTranslatef (0.0 1.4 0.0); //It‘s head
glRotatef ((GLfloat) head 0.0 1.0 0.0);
glScalef (0.50.60.5);
glutWireCube (1.0);
glPopMatrix();
glPushMatrix();
glTranslatef (0.8 0.9 0.0); //It‘s the right shoulder
g
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 196686 2010-11-01 19:17 robot\Debug\robot.exe
文件 13214 2010-11-01 19:17 robot\Debug\robot.obj
文件 451584 2010-11-01 19:17 robot\Debug\robot.pdb
文件 33792 2010-11-01 20:29 robot\Debug\vc60.idb
文件 45056 2010-11-01 19:17 robot\Debug\vc60.pdb
文件 288648 2010-11-01 19:17 robot\Debug\robot.ilk
文件 300520 2010-11-01 17:20 robot\Debug\robot.pch
文件 3387 2009-10-26 09:36 robot\robot.dsp
文件 535 2009-10-26 09:37 robot\robot.dsw
文件 50176 2010-11-01 20:33 robot\robot.ncb
文件 1167 2010-11-01 19:17 robot\robot.plg
文件 27670 2009-09-30 16:17 robot\glut.h
文件 28728 2009-09-30 16:17 robot\glut32.lib
文件 7041 2010-11-01 19:08 robot\robot.c
文件 48640 2010-11-01 20:33 robot\robot.opt
目录 0 2010-02-23 00:35 robot\Debug
目录 0 2010-10-17 21:54 robot
----------- --------- ---------- ----- ----
1496844 17
- 上一篇:PWM整流技术
- 下一篇:lucky draw
相关资源
- 包含GlU32.Lib glut32.dll glut32.lib glut.dll
- gl/glext.h
- unity3d打开外置摄像头
- 参照葛德彪书编写的3D FDTD源文件
- glutdlls37beta
- unity3d 源代码 Space Game Starter Kit 太空射
- D3D开启/关闭
- Unity5.x3d游戏开发技术详解与典型案例
- Unity3D Lightmap贴图、加载、替换与切换
- 三菱Q173D运动CPU SV22 OS
- DXP AD库文件元件库+封装库+3D模型 包含
- opengl所需的5个基本文件
- gltools/freeglut
- 2015年 LabWindows CVI 3D graph控件编程
- openGL中的glut库,32位和64位
- unity3d试衣源码
- openGL期末大作业——行走的机器人
- unity3d的模型导入与脚本练习
- 20190115-5c3d91493c3e53.25395649.rar
- Unity3D手机游戏开发金玺曾书籍+光盘
- OpenGL立方体带黑白格格纹理有光照可
- 计算机图形学OpenGL、codeblock、四连通
- 3dr数传调试软件新
- Lunch Box_121014
- 巧用3dmax快捷键,提高作图效率
- Smart 3d 软件快速上手操作指南
- opengl鼠标旋转,键盘缩放和平移
- 点云配准PFH、FPFH、icp、NDT、3Dsc.zip
- 纯js 3D书架
- 步进电机TB6560AHQ封装附3D封装
评论
共有 条评论