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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? glm.h

?? 圖形學(xué)課件 圖形學(xué)課件 圖形學(xué)課件
?? H
字號(hào):
/*          glm.h      Nate Robins, 1997, 2000
      nate@pobox.com, http://www.pobox.com/~nate
 
      Wavefront OBJ model file format reader/writer/manipulator.

      Includes routines for generating smooth normals with
      preservation of edges, welding redundant vertices & texture
      coordinate generation (spheremap and planar projections) + more.

 */#include <GL/glut.h>#ifndef M_PI#define M_PI 3.14159265f#endif#define GLM_NONE     (0)            /* render with only vertices */#define GLM_FLAT     (1 << 0)       /* render with facet normals */#define GLM_SMOOTH   (1 << 1)       /* render with vertex normals */#define GLM_TEXTURE  (1 << 2)       /* render with texture coords */#define GLM_COLOR    (1 << 3)       /* render with colors */#define GLM_MATERIAL (1 << 4)       /* render with materials *//* GLMmaterial: Structure that defines a material in a model.  */typedef struct _GLMmaterial{  char* name;                   /* name of material */  GLfloat diffuse[4];           /* diffuse component */  GLfloat ambient[4];           /* ambient component */  GLfloat specular[4];          /* specular component */  GLfloat emmissive[4];         /* emmissive component */  GLfloat shininess;            /* specular exponent */} GLMmaterial;/* GLMtriangle: Structure that defines a triangle in a model. */typedef struct _GLMtriangle {  GLuint vindices[3];           /* array of triangle vertex indices */  GLuint nindices[3];           /* array of triangle normal indices */  GLuint tindices[3];           /* array of triangle texcoord indices*/  GLuint findex;                /* index of triangle facet normal */} GLMtriangle;/* GLMgroup: Structure that defines a group in a model. */typedef struct _GLMgroup {  char*             name;           /* name of this group */  GLuint            numtriangles;   /* number of triangles in this group */  GLuint*           triangles;      /* array of triangle indices */  GLuint            material;       /* index to material for group */  struct _GLMgroup* next;           /* pointer to next group in model */} GLMgroup;/* GLMmodel: Structure that defines a model. */typedef struct _GLMmodel {  char*    pathname;            /* path to this model */  char*    mtllibname;          /* name of the material library */  GLuint   numvertices;         /* number of vertices in model */  GLfloat* vertices;            /* array of vertices  */  GLuint   numnormals;          /* number of normals in model */  GLfloat* normals;             /* array of normals */  GLuint   numtexcoords;        /* number of texcoords in model */  GLfloat* texcoords;           /* array of texture coordinates */  GLuint   numfacetnorms;       /* number of facetnorms in model */  GLfloat* facetnorms;          /* array of facetnorms */  GLuint       numtriangles;    /* number of triangles in model */  GLMtriangle* triangles;       /* array of triangles */  GLuint       nummaterials;    /* number of materials in model */  GLMmaterial* materials;       /* array of materials */  GLuint       numgroups;       /* number of groups in model */  GLMgroup*    groups;          /* linked list of groups */  GLfloat position[3];          /* position of the model */} GLMmodel;/* glmUnitize: "unitize" a model by translating it to the origin and * scaling it to fit in a unit cube around the origin.  Returns the * scalefactor used. * * model - properly initialized GLMmodel structure  */GLfloatglmUnitize(GLMmodel* model);/* glmDimensions: Calculates the dimensions (width, height, depth) of * a model. * * model      - initialized GLMmodel structure * dimensions - array of 3 GLfloats (GLfloat dimensions[3]) */GLvoidglmDimensions(GLMmodel* model, GLfloat* dimensions);/* glmScale: Scales a model by a given amount. *  * model - properly initialized GLMmodel structure * scale - scalefactor (0.5 = half as large, 2.0 = twice as large) */GLvoidglmScale(GLMmodel* model, GLfloat scale);/* glmReverseWinding: Reverse the polygon winding for all polygons in * this model.  Default winding is counter-clockwise.  Also changes * the direction of the normals. *  * model - properly initialized GLMmodel structure  */GLvoidglmReverseWinding(GLMmodel* model);/* glmFacetNormals: Generates facet normals for a model (by taking the * cross product of the two vectors derived from the sides of each * triangle).  Assumes a counter-clockwise winding. * * model - initialized GLMmodel structure */GLvoidglmFacetNormals(GLMmodel* model);/* glmVertexNormals: Generates smooth vertex normals for a model. * First builds a list of all the triangles each vertex is in.  Then * loops through each vertex in the the list averaging all the facet * normals of the triangles each vertex is in.  Finally, sets the * normal index in the triangle for the vertex to the generated smooth * normal.  If the dot product of a facet normal and the facet normal * associated with the first triangle in the list of triangles the * current vertex is in is greater than the cosine of the angle * parameter to the function, that facet normal is not added into the * average normal calculation and the corresponding vertex is given * the facet normal.  This tends to preserve hard edges.  The angle to * use depends on the model, but 90 degrees is usually a good start. * * model - initialized GLMmodel structure * angle - maximum angle (in degrees) to smooth across */GLvoidglmVertexNormals(GLMmodel* model, GLfloat angle);/* glmLinearTexture: Generates texture coordinates according to a * linear projection of the texture map.  It generates these by * linearly mapping the vertices onto a square. * * model - pointer to initialized GLMmodel structure */GLvoidglmLinearTexture(GLMmodel* model);/* glmSpheremapTexture: Generates texture coordinates according to a * spherical projection of the texture map.  Sometimes referred to as * spheremap, or reflection map texture coordinates.  It generates * these by using the normal to calculate where that vertex would map * onto a sphere.  Since it is impossible to map something flat * perfectly onto something spherical, there is distortion at the * poles.  This particular implementation causes the poles along the X * axis to be distorted. * * model - pointer to initialized GLMmodel structure */GLvoidglmSpheremapTexture(GLMmodel* model);/* glmDelete: Deletes a GLMmodel structure. * * model - initialized GLMmodel structure */GLvoidglmDelete(GLMmodel* model);/* glmReadOBJ: Reads a model description from a Wavefront .OBJ file. * Returns a pointer to the created object which should be free'd with * glmDelete(). * * filename - name of the file containing the Wavefront .OBJ format data.   */GLMmodel* glmReadOBJ(char* filename);/* glmWriteOBJ: Writes a model description in Wavefront .OBJ format to * a file. * * model    - initialized GLMmodel structure * filename - name of the file to write the Wavefront .OBJ format data to * mode     - a bitwise or of values describing what is written to the file *            GLM_NONE    -  write only vertices *            GLM_FLAT    -  write facet normals *            GLM_SMOOTH  -  write vertex normals *            GLM_TEXTURE -  write texture coords *            GLM_FLAT and GLM_SMOOTH should not both be specified. */GLvoidglmWriteOBJ(GLMmodel* model, char* filename, GLuint mode);/* glmDraw: Renders the model to the current OpenGL context using the * mode specified. * * model    - initialized GLMmodel structure * mode     - a bitwise OR of values describing what is to be rendered. *            GLM_NONE    -  render with only vertices *            GLM_FLAT    -  render with facet normals *            GLM_SMOOTH  -  render with vertex normals *            GLM_TEXTURE -  render with texture coords *            GLM_FLAT and GLM_SMOOTH should not both be specified. */GLvoidglmDraw(GLMmodel* model, GLuint mode);/* glmList: Generates and returns a display list for the model using * the mode specified. * * model    - initialized GLMmodel structure * mode     - a bitwise OR of values describing what is to be rendered. *            GLM_NONE    -  render with only vertices *            GLM_FLAT    -  render with facet normals *            GLM_SMOOTH  -  render with vertex normals *            GLM_TEXTURE -  render with texture coords *            GLM_FLAT and GLM_SMOOTH should not both be specified.   */GLuintglmList(GLMmodel* model, GLuint mode);/* glmWeld: eliminate (weld) vectors that are within an epsilon of * each other. * * model      - initialized GLMmodel structure * epsilon    - maximum difference between vertices *              ( 0.00001 is a good start for a unitized model) * */GLvoidglmWeld(GLMmodel* model, GLfloat epsilon);
/* glmReadPPM: read a PPM raw (type P6) file.  The PPM file has a header
 * that should look something like:
 *
 *    P6
 *    # comment
 *    width height max_value
 *    rgbrgbrgb...
 *
 * where "P6" is the magic cookie which identifies the file type and
 * should be the only characters on the first line followed by a
 * carriage return.  Any line starting with a # mark will be treated
 * as a comment and discarded.   After the magic cookie, three integer
 * values are expected: width, height of the image and the maximum
 * value for a pixel (max_value must be < 256 for PPM raw files).  The
 * data section consists of width*height rgb triplets (one byte each)
 * in binary format (i.e., such as that written with fwrite() or
 * equivalent).
 *
 * The rgb data is returned as an array of unsigned chars (packed
 * rgb).  The malloc()'d memory should be free()'d by the caller.  If
 * an error occurs, an error message is sent to stderr and NULL is
 * returned.
 *
 * filename   - name of the .ppm file.
 * width      - will contain the width of the image on return.
 * height     - will contain the height of the image on return.
 *
 */
GLubyte* 
glmReadPPM(char* filename, int* width, int* height);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一区二视频| 丁香婷婷综合激情五月色| 色噜噜狠狠色综合中国| 日韩理论在线观看| 91黄色免费版| 视频一区欧美日韩| 日韩精品专区在线| 国产成人亚洲综合色影视| 国产精品妹子av| 色香蕉久久蜜桃| 日韩电影免费在线看| 精品国产欧美一区二区| 成熟亚洲日本毛茸茸凸凹| 一区二区三区日本| 欧美一区二区性放荡片| 国产露脸91国语对白| 中文字幕中文字幕一区二区| 欧美日韩一区小说| 极品少妇一区二区三区精品视频| 国产精品无码永久免费888| 色一区在线观看| 美女一区二区久久| 国产视频一区二区三区在线观看| 一本久久精品一区二区| 免费的国产精品| 国产精品美女一区二区三区| 欧美欧美欧美欧美首页| 狠狠色综合日日| 亚洲同性gay激情无套| 欧美美女黄视频| 成人性生交大片免费看视频在线 | 九色综合狠狠综合久久| 中文字幕一区二区在线播放| 欧美一卡二卡三卡| 91麻豆蜜桃一区二区三区| 麻豆精品蜜桃视频网站| 成人欧美一区二区三区白人| 欧美本精品男人aⅴ天堂| av电影在线观看不卡| 蜜臂av日日欢夜夜爽一区| 樱桃视频在线观看一区| 久久久噜噜噜久久人人看| 91黄色激情网站| 成人一级视频在线观看| 蜜桃av一区二区在线观看| 亚洲一区二区三区四区的| 亚洲国产高清aⅴ视频| 欧美一区二区三区四区高清| 91蝌蚪porny九色| 国产风韵犹存在线视精品| 日韩黄色小视频| 亚洲一区二区精品视频| 国产精品久久看| 国产蜜臀av在线一区二区三区| 欧美一区二区啪啪| 欧美三区在线观看| 一本高清dvd不卡在线观看| 国产精品69毛片高清亚洲| 美女尤物国产一区| 天堂一区二区在线| 亚洲高清中文字幕| 亚洲欧美另类小说视频| 国产精品三级在线观看| 国产视频在线观看一区二区三区 | 日韩欧美国产电影| 欧美伦理影视网| 欧美午夜精品久久久久久超碰 | 色综合天天综合给合国产| 成人夜色视频网站在线观看| 国产精品中文字幕欧美| 久久99精品久久久久久| 老司机精品视频导航| 免费观看在线综合色| 日韩中文字幕不卡| 日韩精品每日更新| 日本成人超碰在线观看| 日日夜夜精品视频免费| 日韩精品午夜视频| 日韩va亚洲va欧美va久久| 香蕉久久夜色精品国产使用方法 | 日韩精品一卡二卡三卡四卡无卡| 亚洲男人电影天堂| 亚洲一区二区三区中文字幕| 亚洲综合免费观看高清完整版| 一区二区日韩电影| 亚洲五月六月丁香激情| 日本特黄久久久高潮| 另类小说综合欧美亚洲| 国产精品一区二区在线看| 成人黄色综合网站| 一本大道久久精品懂色aⅴ| 色婷婷综合久久久久中文| 欧美在线不卡一区| 91精品国产综合久久香蕉的特点| 日韩午夜中文字幕| 久久精品亚洲麻豆av一区二区| 中文字幕av资源一区| 日韩毛片高清在线播放| 性做久久久久久久免费看| 六月丁香综合在线视频| 国产99久久久精品| 91久久精品一区二区| 欧美一二三在线| 国产亚洲欧美日韩俺去了| 国产精品久久久久久妇女6080| 亚洲伦理在线精品| 美腿丝袜亚洲综合| 欧美日本一道本| 日韩欧美在线综合网| 中文文精品字幕一区二区| 一区二区三区日韩欧美精品| 捆绑调教一区二区三区| 成人黄页毛片网站| 欧美伦理影视网| 中日韩av电影| 日日摸夜夜添夜夜添国产精品| 国产另类ts人妖一区二区| 欧美伊人久久大香线蕉综合69| 欧美tk—视频vk| 夜夜亚洲天天久久| 激情小说亚洲一区| 在线中文字幕一区二区| 精品粉嫩aⅴ一区二区三区四区| 亚洲欧美怡红院| 狠狠狠色丁香婷婷综合久久五月| 99re热这里只有精品免费视频 | 精品日本一线二线三线不卡| 国产精品久久久久久久岛一牛影视| 婷婷综合在线观看| 成人一区二区三区中文字幕| 欧美巨大另类极品videosbest| 国产欧美一区二区三区鸳鸯浴 | 久久超碰97中文字幕| 色8久久人人97超碰香蕉987| 久久免费精品国产久精品久久久久| 亚洲一区二区中文在线| 成人污视频在线观看| 日韩美女在线视频| 亚洲18色成人| 在线观看国产91| 中文字幕一区免费在线观看 | 成人免费视频视频| 欧美成人a视频| 午夜精品福利一区二区三区蜜桃| 成人av电影在线网| xvideos.蜜桃一区二区| 日韩av网站免费在线| 91久久一区二区| 成人欧美一区二区三区小说| 国产91在线看| 久久久影视传媒| 久久91精品国产91久久小草| 在线播放亚洲一区| 五月婷婷欧美视频| 欧美写真视频网站| 亚洲精品第1页| 91福利国产成人精品照片| 国产精品狼人久久影院观看方式| 国产成人精品免费在线| 久久这里只有精品视频网| 久久国产精品第一页| 欧美精品在线视频| 天堂va蜜桃一区二区三区| 欧美日韩另类国产亚洲欧美一级| 亚洲乱码日产精品bd| 一本久久a久久免费精品不卡| 成人欧美一区二区三区白人| 99久久99精品久久久久久| 国产精品高潮呻吟久久| 99综合影院在线| 亚洲另类春色校园小说| av一区二区三区黑人| 亚洲品质自拍视频网站| 一本久久a久久精品亚洲| 亚洲午夜精品网| 欧美精品 日韩| 久久精品国产精品亚洲精品| 精品日韩av一区二区| 国产在线麻豆精品观看| 国产日韩亚洲欧美综合| 不卡高清视频专区| 一区二区三区免费看视频| 欧美美女喷水视频| 另类小说图片综合网| 国产香蕉久久精品综合网| 成人国产精品免费观看视频| 亚洲精品国久久99热| 67194成人在线观看| 国产在线视频一区二区| 亚洲欧美在线视频观看| 欧美视频日韩视频在线观看| 亚洲成a人片在线不卡一二三区| 日韩一区二区在线观看| 懂色中文一区二区在线播放| 亚洲免费在线视频一区 二区| 欧美日韩国产a| 国产精品一区二区91| 亚洲乱码国产乱码精品精的特点| 制服丝袜亚洲网站| 粉嫩av亚洲一区二区图片|