91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 69.88MB
    文件類型: .7z
    金幣: 2
    下載: 1 次
    發布日期: 2022-01-04
  • 語言: 其他
  • 標簽: scientific??v??

資源簡介

學校暑期課程科學可視化課程的ppt,需要的拿走。 2018/07/10 13:28 1 - Introduction 2018/07/10 13:29 2 - Transformation 2018/07/17 08:54 3 - OpenGL 2018/07/10 13:32 4 - Perspective Transformation 2018/07/10 13:32 5 - Color and Illumination 2018/07/10 13:32 6 - Visible Surface Determination 2018/07/10 13:32 7 - Clipping 2018/07/31 10:15 8 - VTK 2018/07/10 13:34 9 - Introduction to DVR and SF

資源截圖

代碼片段和文件信息

/*??CS?551?Assignment?1?skeleton?*/
/*??Brian?Clarke??*/
/*
keyboard?controls:
s/S: Positive/negative?shoulder?rotation
e/E: Positive/negative?elbow?rotation
O/C: Open/Close?the?hand?--?YOU?GET?TO?IMPLEMENT?THIS

x/X: Positive/negative?X-axis?shift?of?the?model
y/Y: Positive/negative?Y-axis?shift?of?the?model
UP/DOWN?ARROWS: (zoom)?Z-axis?shift?of?the?model

LEFT/RIGHT?ARROWS: Y-axis?rotations
PAGE?UP/DOWN: X-axis?rotations
ESC: exit
*/
#include
#include
#include
#include

#define?ESC?27

static?GLfloat?red[]={100}green[]={010};?/*?blue[]={001};?*/
static?int?shoulder=0elbow=0;
static?int?xrot=0yrot=0zrot=0;
static?GLfloat?xshift=-1.0yshift=0.0zoom=-3.0;

/*?some?basic?GL?initialization?*/
void?init()
{
glClearColor(0.00.00.00.0);
glShadeModel(GL_FLAT);
glEnable(GL_DEPTH_TEST);
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
}

/*?The?display?callback?*/
void?draw_stuff()
{
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glPushMatrix();
glTranslatef(xshiftyshiftzoom);
glRotatef((GLfloat)xrot1.00.00.0);
glRotatef((GLfloat)yrot0.01.00.0);
glRotatef((GLfloat)zrot0.00.01.0);

glColor3fv(red);
glPushMatrix();
glTranslatef(-1.00.00.0);
glRotatef((GLfloat)shoulder0.00.01.0);
glTranslatef(1.00.00.0);
glPushMatrix();
glScalef(2.00.41.0);
glutSolidCube(1.0);
glPopMatrix();

glColor3fv(green);
glTranslatef(1.00.00.0);
glRotatef((GLfloat)elbow0.00.01.0);
glTranslatef(1.00.00.0);
glPushMatrix();
glScalef(2.00.41.0);
glutSolidCube(1.0);
glPopMatrix();

/*?Put?the?“hand“?code?here...*/

glPopMatrix();
glPopMatrix();
glutSwapBuffers();
}

/*?the?window-reshape?callback?*/
void?reshape(int?w?int?h)
{
glViewport(00(GLsizei)w(GLsizei)h);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
gluPerspective(65.0(GLfloat)w/(GLfloat)h1.020.0);
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0.00.0-5.0);
}

/*?The?basic?keyboard?controls?callback?for?glutKeyboardFunc()?*/
void?kb(unsigned?char?key?int?x?int?y)
{
switch(key)
{
case?‘s‘:
shoulder=(shoulder+5)%360;
glutPostRedisplay();
break;
case?‘S‘:
shoulder=(shoulder-5)%360;
glutPostRedisplay();
break;
case?‘e‘:
elbow=(elbow+5)%360;
glutPostRedisplay();
break;
case?‘E‘:
elbow=(elbow-5)%360;
glutPostRedisplay();
break;
case?‘C‘:
/*?close?the?“hand“?*/
break;
case?‘O‘:
/*?open?the?“hand“?*/
break;
case?‘x‘:
xshift+=.25;
glutPostRedisplay();
break;
case?‘X‘:
xshift-=.25;
glutPostRedisplay();
break;
case?‘y‘:
yshift+=.25;
glutPostRedisplay();
break;
case?‘Y‘:
yshift-=.25;
glutPostRedisplay();
break;
case?‘r‘:
case?‘R‘:
xrot=yrot=zrot=shoulder=elbow=0;
xshift=-1.0;
yshift=0.0;
zoom=-3.0;
glutPostRedisplay();
break;
case?‘z‘:
zrot=(zrot-1)%360;
glutPostRedisplay();
break;
case?‘Z‘:
zrot=(zrot+1)%360;
glutPostRed

評論

共有 條評論