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

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

?? glm.h

?? 計算機圖形學(xué)~想必是很多人需要的~在此共享一下
?? H
字號:
/*          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
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩免费观看高清完整版| 久久久久九九视频| 欧美一级久久久久久久大片| 欧美女孩性生活视频| 色婷婷国产精品| 在线精品视频一区二区三四| 91蝌蚪porny九色| 91久久精品网| 日韩欧美高清在线| 久久久国产综合精品女国产盗摄| 久久久国产精华| 亚洲伦理在线免费看| 亚洲国产婷婷综合在线精品| 日本亚洲天堂网| 91免费看`日韩一区二区| 日本乱码高清不卡字幕| 精品国产髙清在线看国产毛片| 亚洲免费av网站| 豆国产96在线|亚洲| 宅男在线国产精品| 午夜亚洲国产au精品一区二区| 99久久99久久综合| 欧美高清在线视频| 韩国女主播成人在线| 成年人网站91| 精品国产一区二区三区久久影院| 亚洲精品国产精华液| 福利视频网站一区二区三区| 欧美区一区二区三区| 国产欧美一区二区精品性色| 久久se精品一区精品二区| 黄网站免费久久| 欧美一级视频精品观看| 亚洲综合图片区| 9色porny自拍视频一区二区| 久久精品夜色噜噜亚洲aⅴ| 性久久久久久久久| 日韩视频在线你懂得| 免费av成人在线| 日韩一级片在线观看| 久久99久国产精品黄毛片色诱| 欧美精品在线视频| 久久精品国产77777蜜臀| 欧美日韩一区 二区 三区 久久精品| 亚洲视频 欧洲视频| 在线亚洲欧美专区二区| 亚洲乱码精品一二三四区日韩在线| 91福利视频在线| 日本不卡的三区四区五区| xfplay精品久久| 国产成人高清在线| 国产精品久久久久影院老司| 日本道免费精品一区二区三区| 一区二区在线免费观看| 欧美性xxxxx极品少妇| 日本午夜精品一区二区三区电影| 精品99一区二区三区| 91在线播放网址| 日韩成人一区二区| 久久久久国产成人精品亚洲午夜 | 亚洲视频你懂的| 欧美日韩亚州综合| 国产91精品一区二区麻豆网站| 国产精品超碰97尤物18| 日韩欧美三级在线| 在线观看国产91| 欧美自拍丝袜亚洲| 国产精品一区2区| 奇米影视在线99精品| 亚洲精品视频免费观看| 国产精品污www在线观看| 欧美一级艳片视频免费观看| 欧美高清dvd| 欧美伊人久久久久久久久影院| 国产一区美女在线| 麻豆国产91在线播放| 亚洲黄色性网站| 亚洲美女视频在线| **欧美大码日韩| 亚洲欧洲av在线| 亚洲三级免费电影| 一区二区三区四区在线免费观看| 综合久久久久综合| 亚洲欧洲日韩女同| 亚洲精品综合在线| 中文字幕欧美一| 亚洲综合免费观看高清完整版 | 国产高清在线观看免费不卡| 青草国产精品久久久久久| 亚洲综合久久久久| 日韩精品电影在线| 国产黄色精品视频| 色av成人天堂桃色av| 欧美日韩精品一区二区三区四区 | 亚洲色欲色欲www| 亚洲欧美日韩国产成人精品影院| 国产精品国产三级国产aⅴ无密码 国产精品国产三级国产aⅴ原创 | 婷婷亚洲久悠悠色悠在线播放| 精品国精品自拍自在线| 综合中文字幕亚洲| 国产一区二区三区四区五区美女| 国产成都精品91一区二区三| 不卡区在线中文字幕| 欧日韩精品视频| 国产欧美日韩麻豆91| 丝袜a∨在线一区二区三区不卡| 狠狠久久亚洲欧美| 色8久久精品久久久久久蜜| 欧美成人国产一区二区| 亚洲精品国产a| 成人深夜视频在线观看| 欧美亚洲一区二区在线观看| 国产亚洲女人久久久久毛片| 亚洲mv大片欧洲mv大片精品| 风间由美性色一区二区三区| 欧美日韩国产电影| 亚洲乱码国产乱码精品精的特点| 国产一区在线观看麻豆| 欧美高清在线精品一区| 日本最新不卡在线| 欧美午夜视频网站| 一区二区三区欧美激情| 99久久国产免费看| 国产精品高潮久久久久无| 国产乱子轮精品视频| 国产亚洲精品中文字幕| 国产一区二区三区免费| 国产亚洲欧美色| 国产一区亚洲一区| 精品久久久三级丝袜| 激情图区综合网| 中文字幕不卡的av| 成人精品免费看| 日韩一区日韩二区| 欧美伦理影视网| 看片网站欧美日韩| 中文字幕免费不卡| 欧美视频第二页| 久久精品国产亚洲a| 欧美激情一区在线| 欧美日韩综合在线| 国产美女精品一区二区三区| 最新不卡av在线| 欧美二区在线观看| 国产福利91精品一区| 亚洲精品中文字幕在线观看| 日韩欧美国产综合一区| 99精品国产视频| 亚洲影院免费观看| 精品免费日韩av| 色综合久久久久久久久| 国产综合久久久久久久久久久久| 国产精品激情偷乱一区二区∴| 欧美三区在线视频| 99久久99久久免费精品蜜臀| 精品一区二区三区视频| 国产精品久久国产精麻豆99网站| 777久久久精品| 九一久久久久久| 亚洲一区二区视频在线| 中文字幕五月欧美| 欧美va日韩va| 欧美视频日韩视频| 9久草视频在线视频精品| 国产精品一区二区在线观看网站| 久久99久久99精品免视看婷婷| 亚洲一区二区三区视频在线| 中文字幕一区二区三| 精品三级在线看| 欧美电影免费观看高清完整版 | 国产精品久久久久久久岛一牛影视| 欧美色成人综合| 欧美日高清视频| 91精品国产综合久久久蜜臀粉嫩 | 另类综合日韩欧美亚洲| 伦理电影国产精品| 极品瑜伽女神91| 激情小说欧美图片| 国产高清精品在线| 成人美女在线视频| 99热国产精品| 99国产欧美另类久久久精品| 91免费国产在线观看| 欧亚洲嫩模精品一区三区| 91精品黄色片免费大全| 久久免费午夜影院| 亚洲欧美一区二区视频| 亚洲一区在线电影| 美脚の诱脚舐め脚责91| 99国产欧美另类久久久精品| 3d动漫精品啪啪一区二区竹菊| 日韩丝袜情趣美女图片| 国产精品天美传媒沈樵| 亚洲永久免费视频| 成人免费看视频| 精品国产91洋老外米糕| 亚洲尤物视频在线| 国产一区二区0| 91精品欧美久久久久久动漫| 亚洲精品国产成人久久av盗摄 |