资源简介
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
相关资源
- Bc衰变中的D波衰减器ηc211D2,ψ
- OSG 72集视频教程和资料140620
- OpenGL参考手册
- The Secret Path 3D 3D魔方迷宫[源码][scra
-
Actionsc
ript 1.0实现能跟随鼠标运动的 - Qt Creator opengl实现四元数鼠标控制轨迹
- Unity3D登录界面工程
- 3DWebGIS 3DWebGIS
- OpenGL文档,api大全,可直接查询函数
- opengl轮廓字体源代码
- MFC读三维模型obj文件
- 3des加解密_C 实现
- 利用OpenGL写毛笔字算法
- MFC中OpenGL面和体的绘制以及动画效果
- unity3d反编译工具
- 基于OPENGL的光线跟踪源代码368758
- VC 实现三维旋转(源码)
- 自编用openGL实现3D分形树,分形山
- OpenGL球形贴图自旋程序
- Quest3D 2个动画相机切换实例
- OpenGL导入贴图的Texture类
- 计算机图形学(openGL)代码
- 用OpenGL开发的机械臂运动仿真程序(
- OpenGL-3D坦克模拟
- FLAC3D数值模拟的边坡稳定性
-
UnityWebPla
yerFull - Scratch:3d飞行模拟器 .sb3
- OPENGL实现世界上最小的3D游戏
- 亲子嘉年华路演活动模型
- 基于GTP修正的R3DGM建模与可视化方法
评论
共有 条评论