#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <esg/parser/glm.h>
Go to the source code of this file.
Defines | |
#define | T(x) (model->triangles[(x)]) |
Typedefs | |
typedef _GLMnode | GLMnode |
Functions | |
static GLfloat | glmMax (GLfloat a, GLfloat b) |
static GLfloat | glmAbs (GLfloat f) |
static GLfloat | glmDot (GLfloat *u, GLfloat *v) |
static GLvoid | glmCross (GLfloat *u, GLfloat *v, GLfloat *n) |
static GLvoid | glmNormalize (GLfloat *v) |
static GLboolean | glmEqual (GLfloat *u, GLfloat *v, GLfloat epsilon) |
GLfloat * | glmWeldVectors (GLfloat *vectors, GLuint *numvectors, GLfloat epsilon) |
GLMgroup * | glmFindGroup (GLMmodel *model, char *name) |
GLMgroup * | glmAddGroup (GLMmodel *model, char *name) |
GLuint | glmFindMaterial (GLMmodel *model, char *name) |
static char * | glmDirName (char *path) |
static GLvoid | glmReadMTL (GLMmodel *model, char *name) |
static GLvoid | glmWriteMTL (GLMmodel *model, char *modelpath, char *mtllibname) |
static GLvoid | glmFirstPass (GLMmodel *model, FILE *file) |
static GLvoid | glmSecondPass (GLMmodel *model, FILE *file) |
GLfloat | glmUnitize (GLMmodel *model) |
GLvoid | glmDimensions (GLMmodel *model, GLfloat *dimensions) |
GLvoid | glmScale (GLMmodel *model, GLfloat scale) |
GLvoid | glmReverseWinding (GLMmodel *model) |
GLvoid | glmFacetNormals (GLMmodel *model) |
GLvoid | glmVertexNormals (GLMmodel *model, GLfloat angle) |
GLvoid | glmLinearTexture (GLMmodel *model) |
GLvoid | glmSpheremapTexture (GLMmodel *model) |
GLvoid | glmDelete (GLMmodel *model) |
GLMmodel * | glmReadOBJ (const char *filename) |
GLvoid | glmWriteOBJ (GLMmodel *model, char *filename, GLuint mode) |
GLvoid | glmDraw (GLMmodel *model, GLuint mode) |
GLuint | glmList (GLMmodel *model, GLuint mode) |
GLvoid | glmWeld (GLMmodel *model, GLfloat epsilon) |
|
Definition at line 23 of file glm.c. Referenced by glmDraw(), glmFacetNormals(), glmReverseWinding(), glmSecondPass(), glmVertexNormals(), and glmWeld(). |
|
|
|
Definition at line 46 of file glm.c. Referenced by glmEqual(), and glmLinearTexture(). |
|
Definition at line 183 of file glm.c. References glmFindGroup(), _GLMmodel::groups, _GLMgroup::material, _GLMgroup::name, _GLMgroup::next, _GLMmodel::numgroups, _GLMgroup::numtriangles, and _GLMgroup::triangles. Referenced by glmFirstPass(). |
|
Definition at line 73 of file glm.c. Referenced by glmFacetNormals(). |
|
Definition at line 1269 of file glm.c. References _GLMmodel::facetnorms, _GLMmodel::groups, _GLMmodel::materials, _GLMmodel::mtllibname, _GLMgroup::name, _GLMmaterial::name, _GLMgroup::next, _GLMmodel::normals, _GLMmodel::nummaterials, _GLMmodel::pathname, _GLMmodel::texcoords, _GLMgroup::triangles, _GLMmodel::triangles, and _GLMmodel::vertices. |
|
Definition at line 838 of file glm.c. References _GLMmodel::numvertices, and _GLMmodel::vertices. Referenced by glmLinearTexture(). |
|
Definition at line 233 of file glm.c. Referenced by glmReadMTL(), and glmWriteMTL(). |
|
|
|
Definition at line 1580 of file glm.c. References _GLMmaterial::ambient, _GLMmaterial::diffuse, _GLMmodel::facetnorms, _GLMtriangle::findex, GLM_COLOR, _GLMmodel::groups, _GLMgroup::material, _GLMmodel::materials, _GLMgroup::next, _GLMtriangle::nindices, _GLMmodel::normals, _GLMgroup::numtriangles, _GLMmaterial::shininess, _GLMmaterial::specular, T, _GLMmodel::texcoords, _GLMtriangle::tindices, _GLMgroup::triangles, _GLMmodel::vertices, and _GLMtriangle::vindices. Referenced by glmList(). |
|
Definition at line 107 of file glm.c. References glmAbs(). Referenced by glmWeldVectors(). |
|
Definition at line 944 of file glm.c. References _GLMmodel::facetnorms, _GLMtriangle::findex, glmCross(), glmNormalize(), _GLMmodel::numfacetnorms, _GLMmodel::numtriangles, T, _GLMmodel::triangles, and _GLMmodel::vertices. Referenced by MayaParser::_init_model(). |
|
Definition at line 164 of file glm.c. References _GLMmodel::groups, _GLMgroup::name, and _GLMgroup::next. Referenced by glmAddGroup(), and glmSecondPass(). |
|
Definition at line 205 of file glm.c. References _GLMmodel::materials, _GLMmaterial::name, and _GLMmodel::nummaterials. Referenced by glmSecondPass(). |
|
Definition at line 438 of file glm.c. References glmAddGroup(), glmReadMTL(), _GLMmodel::groups, _GLMmodel::mtllibname, _GLMgroup::next, _GLMmodel::numnormals, _GLMmodel::numtexcoords, _GLMmodel::numtriangles, _GLMgroup::numtriangles, _GLMmodel::numvertices, and _GLMgroup::triangles. Referenced by glmReadOBJ(). |
|
Definition at line 1157 of file glm.c. References glmAbs(), glmDimensions(), glmMax(), _GLMmodel::numtexcoords, _GLMmodel::numvertices, _GLMmodel::texcoords, and _GLMmodel::vertices. |
|
Definition at line 1696 of file glm.c. References glmDraw(). |
|
Definition at line 37 of file glm.c. Referenced by glmLinearTexture(). |
|
Definition at line 87 of file glm.c. Referenced by glmFacetNormals(). |
|
Definition at line 256 of file glm.c. References _GLMmaterial::ambient, _GLMmaterial::diffuse, glmDirName(), _GLMmodel::materials, _GLMmaterial::name, _GLMmodel::nummaterials, _GLMmodel::pathname, _GLMmaterial::shininess, and _GLMmaterial::specular. Referenced by glmFirstPass(). |
|
|
Definition at line 898 of file glm.c. References _GLMmodel::numnormals, _GLMmodel::numtexcoords, _GLMmodel::numtriangles, swap, and T. |
|
Definition at line 880 of file glm.c. References _GLMmodel::numvertices, and _GLMmodel::vertices. |
|
Definition at line 578 of file glm.c. References glmFindGroup(), glmFindMaterial(), _GLMmodel::groups, _GLMgroup::material, _GLMmodel::normals, _GLMgroup::numtriangles, T, _GLMmodel::texcoords, _GLMgroup::triangles, and _GLMmodel::vertices. Referenced by glmReadOBJ(). |
|
Definition at line 1212 of file glm.c. References _GLMmodel::normals, _GLMmodel::numnormals, _GLMmodel::numtexcoords, and _GLMmodel::texcoords. Referenced by MayaParser::_init_model(). |
|
Definition at line 774 of file glm.c. References _GLMmodel::numvertices, and _GLMmodel::vertices. Referenced by MayaParser::_init_model(). |
|
Definition at line 1001 of file glm.c. References _GLMmodel::facetnorms, M_PI, _GLMmodel::normals, _GLMmodel::numnormals, _GLMmodel::numtriangles, _GLMmodel::numvertices, and T. Referenced by MayaParser::_init_model(). |
|
Definition at line 1717 of file glm.c. References glmWeldVectors(), _GLMmodel::numtriangles, _GLMmodel::numvertices, T, and _GLMmodel::vertices. |
|
Definition at line 127 of file glm.c. References glmEqual(). Referenced by glmWeld(). |
|
Definition at line 383 of file glm.c. References _GLMmaterial::ambient, _GLMmaterial::diffuse, glmDirName(), _GLMmodel::materials, _GLMmaterial::name, _GLMmodel::nummaterials, _GLMmaterial::shininess, and _GLMmaterial::specular. Referenced by glmWriteOBJ(). |
|
Definition at line 1386 of file glm.c. References _GLMmodel::facetnorms, GLM_COLOR, GLM_FLAT, GLM_MATERIAL, GLM_SMOOTH, GLM_TEXTURE, glmWriteMTL(), _GLMmodel::materials, _GLMmodel::mtllibname, _GLMmodel::normals, _GLMmodel::numvertices, _GLMmodel::texcoords, and _GLMmodel::vertices. |