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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? glm.h

?? 詳細介紹c++編程
?? H
字號:
/*    
      glm.h
      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 <windows.h>
#include <gl/gl.h>

#ifndef GL_MODEL

#define GL_MODEL

#ifndef M_PI
#define M_PI 3.14159265
#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 
 */
GLfloat glmUnitize(GLMmodel* model);

/* glmDimensions: Calculates the dimensions (width, height, depth) of
 * a model.
 *
 * model      - initialized GLMmodel structure
 * dimensions - array of 3 GLfloats (GLfloat dimensions[3])
 */
GLvoid glmDimensions(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)
 */
GLvoid glmScale(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 
 */
GLvoid glmReverseWinding(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
 */
GLvoid glmFacetNormals(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
 */
GLvoid glmVertexNormals(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
 */
GLvoid glmLinearTexture(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
 */
GLvoid glmSpheremapTexture(GLMmodel* model);

/* glmDelete: Deletes a GLMmodel structure.
 *
 * model - initialized GLMmodel structure
 */
GLvoid glmDelete(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);


/* 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.
 */
GLvoid glmDraw(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.  
 */
GLuint glmList(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)
 *
 */
GLuint glmWeld(GLMmodel* model, GLfloat epsilon);

#endif //GL_MODEL

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区在线观看视频| 国精品**一区二区三区在线蜜桃| 日本中文字幕一区二区有限公司| 国产老妇另类xxxxx| 欧美日韩三级视频| 中文字幕不卡的av| 国产精品88av| 欧美天堂一区二区三区| 中文字幕中文字幕一区| 懂色av噜噜一区二区三区av| 日韩视频免费直播| 亚洲国产精品久久久男人的天堂| 风流少妇一区二区| 亚洲欧洲日产国产综合网| 国产a视频精品免费观看| 欧美成人精品3d动漫h| 久久精品久久99精品久久| 精品女同一区二区| 国模一区二区三区白浆| 欧美激情一区二区三区不卡| av网站一区二区三区| 国产精品成人在线观看| 欧美在线观看视频一区二区| 午夜av一区二区| 精品福利av导航| 成人av电影免费在线播放| 亚洲午夜国产一区99re久久| 在线播放中文字幕一区| 久久se这里有精品| 亚洲女子a中天字幕| 4hu四虎永久在线影院成人| 另类人妖一区二区av| 精品噜噜噜噜久久久久久久久试看| 丁香另类激情小说| 蜜桃一区二区三区四区| 亚洲另类在线视频| 欧美精品一区二区蜜臀亚洲| 色婷婷久久久综合中文字幕| 久久成人18免费观看| 亚洲最新视频在线播放| 精品盗摄一区二区三区| 91无套直看片红桃| 国产一区二区伦理| 亚洲一区中文在线| 国产精品国模大尺度视频| 日韩视频国产视频| 91福利资源站| 色8久久精品久久久久久蜜| 国产麻豆精品在线观看| 日本色综合中文字幕| 亚洲另类中文字| 中文字幕在线一区免费| 国产视频一区二区在线观看| 日韩一区二区三区高清免费看看| 91成人在线精品| 色综合久久中文字幕| 99久久国产免费看| 色先锋aa成人| 色综合天天综合网国产成人综合天 | 色综合久久天天综合网| 国产99久久久国产精品 | 欧美三级日韩三级国产三级| 99国产精品国产精品久久| 成人美女视频在线观看18| 蜜臀av一区二区在线观看| 日韩av在线播放中文字幕| 日本91福利区| 蜜桃精品视频在线| 精久久久久久久久久久| 国产乱对白刺激视频不卡| 国产精品一级片| 成人app网站| 色av成人天堂桃色av| 欧美亚洲一区二区三区四区| 欧美日韩在线直播| 国内成人自拍视频| 粉嫩绯色av一区二区在线观看| 国产在线精品一区二区不卡了| 色综合色狠狠综合色| 69堂成人精品免费视频| 国产精品网友自拍| 香蕉乱码成人久久天堂爱免费| 一区二区三区在线视频观看58| 亚洲最新视频在线观看| 免费一级欧美片在线观看| 成人网男人的天堂| 欧美色倩网站大全免费| 中文字幕免费观看一区| 蜜桃视频在线观看一区| 91同城在线观看| 久久综合久久鬼色中文字| 亚洲猫色日本管| 成人综合婷婷国产精品久久免费| 欧美日韩三级在线| 亚洲一区二区三区四区在线观看 | 久久久影院官网| 亚洲高清中文字幕| 色综合久久99| 国产精品国产馆在线真实露脸| 精品系列免费在线观看| 欧美成人aa大片| 久久国产精品99久久人人澡| 欧美日韩精品一区二区天天拍小说 | 日韩一区二区免费高清| 亚洲一区二三区| 51午夜精品国产| 青青草成人在线观看| 精品国产91九色蝌蚪| 亚洲成人先锋电影| 欧美酷刑日本凌虐凌虐| 国产91精品免费| 免费在线成人网| 午夜私人影院久久久久| 国产精品美女久久久久久久| 99久久国产综合精品色伊| 欧美天堂一区二区三区| 欧美在线观看18| 成人黄色国产精品网站大全在线免费观看 | 久久久精品人体av艺术| 99精品欧美一区二区蜜桃免费 | 亚洲欧洲精品一区二区三区不卡| 色综合久久久久| 奇米一区二区三区| 亚洲国产成人午夜在线一区| 欧洲中文字幕精品| 国产sm精品调教视频网站| 亚洲国产va精品久久久不卡综合| 久久综合九色综合欧美98| 欧美在线视频你懂得| www.日本不卡| 国产传媒欧美日韩成人| 亚洲亚洲人成综合网络| 久久九九99视频| 欧美一区国产二区| 欧美日韩精品欧美日韩精品一综合| 国产一区二区精品久久| 日本不卡123| 午夜精品影院在线观看| 国产精品一品视频| 国产成人在线视频网址| 国产成人在线网站| 亚洲欧美另类综合偷拍| 欧美日韩在线播| 精品在线免费视频| 欧美tickling网站挠脚心| 99国产精品久| 亚洲小说春色综合另类电影| 精品日韩99亚洲| 欧美在线短视频| 日本黄色一区二区| 91丨porny丨户外露出| 粉嫩13p一区二区三区| 国内精品自线一区二区三区视频| 亚洲成人自拍偷拍| 亚洲成人动漫精品| 免费欧美在线视频| 久久精品国产99| 成人白浆超碰人人人人| 99视频在线精品| 成人av在线网| 99久久精品免费看国产免费软件| 成人av中文字幕| 欧美夫妻性生活| 日韩精品一区二区三区在线观看| 久久久久久久久久久电影| 国产精品久久久久久妇女6080| 亚洲免费观看高清完整| 日韩精品高清不卡| 不卡在线观看av| 在线电影国产精品| 国产精品久久久久久久久快鸭| 亚洲精品国产无套在线观| 青草av.久久免费一区| 岛国精品一区二区| 日韩欧美中文一区二区| 国产精品久久久久久久久久久免费看| 亚洲色欲色欲www在线观看| 久久精品网站免费观看| 亚洲一区二区三区四区在线免费观看 | 国产真实精品久久二三区| 91在线精品一区二区| 精品99久久久久久| 青青青伊人色综合久久| 91网站最新地址| 国产精品网曝门| 国产美女精品一区二区三区| 欧美男生操女生| 亚洲图片欧美激情| 不卡大黄网站免费看| 久久久亚洲国产美女国产盗摄| 亚洲一区电影777| 色视频一区二区| 亚洲精品国产无天堂网2021| 成人免费视频国产在线观看| www久久久久| 成人小视频在线| 国产三级三级三级精品8ⅰ区| 免费精品99久久国产综合精品| 欧美巨大另类极品videosbest | 亚洲欧美日韩综合aⅴ视频|