Tachyon (current)
Current Main Branch
|
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include "tachyon.h"
#include "ac3dparse.h"
Go to the source code of this file.
Macros | |
#define | PARSE_INTERNAL |
Functions | |
static int | stringcmp (char *a, char *b) |
static void | GetAC3DString (FILE *dfile, char *str) |
static void | reset_tex_table (void) |
static errcode | add_texture (void *tex, char name[TEXNAMELEN]) |
static errcode | GetString (FILE *dfile, char *string) |
unsigned int | ParseAC3D (char *modelfile, SceneHandle scene) |
static errcode | GetScenedefs (FILE *dfile, SceneHandle scene) |
static errcode | GetScene (FILE *dfile, SceneHandle scene) |
static errcode | GetMaterial (FILE *dfile, SceneHandle scene) |
static void | RmatIdentity (RotMat rmat) |
static void | RmatMult (RotMat A, RotMat B, RotMat C) |
static void | RmatTmatMult (TransMat NT, RotMat R, TransMat T) |
static void | tlist_add_tri (tri_list **tlist, int v0, int v1, int v2, int smooth, int texnum) |
static void | tlist_delete (tri_list **tlist) |
static void | clear_normals (apivector *normals, int numverts) |
static void | normalize (apivector *vec) |
static void | renormalize_normals (apivector *normals, int numverts) |
static apivector | tri_normal (apivector *v0, apivector *v1, apivector *v2) |
static void | gen_triangles (SceneHandle scene, tri_list *tlist, apivector *vertex, apivector *normal) |
static errcode | GetRecurseObject (SceneHandle scene, FILE *dfile, RotMat rmat, TransMat tmat) |
static errcode | GetObject (FILE *dfile, SceneHandle scene) |
Variables | |
static texentry | textable [NUMTEXS] |
static int | numtextures |
static int | numobjectsparsed |
static apicolor | scenebackcol |
#define PARSE_INTERNAL |
Definition at line 24 of file ac3dparse.c.
|
static |
Definition at line 71 of file ac3dparse.c.
References numtextures, PARSEALLOCERR, PARSENOERR, and textable.
Referenced by GetMaterial().
|
static |
Definition at line 312 of file ac3dparse.c.
References apivector::x, apivector::y, and apivector::z.
Referenced by GetRecurseObject().
|
static |
Definition at line 361 of file ac3dparse.c.
References rt_stri(), rt_tri(), and textable.
Referenced by GetRecurseObject().
|
static |
Definition at line 51 of file ac3dparse.c.
Referenced by GetRecurseObject().
|
static |
Definition at line 206 of file ac3dparse.c.
References add_texture(), apitexture::ambient, apicolor::b, apitexture::col, apitexture::diffuse, apicolor::g, GetString(), apitexture::opacity, apicolor::r, rt_texture(), apitexture::specular, and apitexture::texturefunc.
Referenced by GetScene().
|
static |
Definition at line 586 of file ac3dparse.c.
References GetRecurseObject(), and RmatIdentity().
Referenced by GetScene().
|
static |
Definition at line 383 of file ac3dparse.c.
References clear_normals(), gen_triangles(), GetAC3DString(), GetString(), PARSEBADSYNTAX, PARSENOERR, renormalize_normals(), RmatIdentity(), RmatMult(), RmatTmatMult(), stringcmp(), tlist_add_tri(), tlist_delete(), tri_normal(), apivector::x, apivector::y, and apivector::z.
Referenced by GetObject().
|
static |
Definition at line 189 of file ac3dparse.c.
References GetMaterial(), GetObject(), PARSEBADSYNTAX, PARSEEOF, and stringcmp().
Referenced by ParseAC3D().
|
static |
Definition at line 141 of file ac3dparse.c.
References apicolor::b, apitexture::col, apicolor::g, PARSENOERR, apicolor::r, rt_camera_setup(), rt_light(), rt_outputfile(), rt_resolution(), rt_texture(), rt_verbose(), apivector::x, apivector::y, and apivector::z.
Referenced by ParseAC3D().
|
static |
Definition at line 85 of file ac3dparse.c.
References numobjectsparsed, PARSEBADSYNTAX, PARSENOERR, and stringcmp().
Referenced by GetMaterial(), and GetRecurseObject().
|
static |
Definition at line 324 of file ac3dparse.c.
References length(), apivector::x, apivector::y, and apivector::z.
Referenced by renormalize_normals(), and tri_normal().
unsigned int ParseAC3D | ( | char * | modelfile, |
SceneHandle | scene | ||
) |
Definition at line 98 of file ac3dparse.c.
References apicolor::b, apicolor::g, GetScene(), GetScenedefs(), numobjectsparsed, PARSEBADFILE, PARSEEOF, PARSENOERR, apicolor::r, reset_tex_table(), rt_background(), and scenebackcol.
Referenced by main().
|
static |
Definition at line 332 of file ac3dparse.c.
References normalize().
Referenced by GetRecurseObject().
|
static |
Definition at line 66 of file ac3dparse.c.
References numtextures, and textable.
Referenced by ParseAC3D().
|
static |
Definition at line 246 of file ac3dparse.c.
Referenced by GetObject(), and GetRecurseObject().
|
static |
Definition at line 258 of file ac3dparse.c.
Referenced by GetRecurseObject().
|
static |
Definition at line 271 of file ac3dparse.c.
Referenced by GetRecurseObject().
|
static |
Definition at line 33 of file ac3dparse.c.
Referenced by GetRecurseObject(), GetScene(), and GetString().
|
static |
Definition at line 281 of file ac3dparse.c.
Referenced by GetRecurseObject().
|
static |
Definition at line 296 of file ac3dparse.c.
Referenced by GetRecurseObject().
Definition at line 340 of file ac3dparse.c.
References normalize(), apivector::x, apivector::y, and apivector::z.
Referenced by GetRecurseObject().
|
static |
Definition at line 30 of file ac3dparse.c.
Referenced by GetString(), and ParseAC3D().
|
static |
Definition at line 29 of file ac3dparse.c.
Referenced by add_texture(), and reset_tex_table().
|
static |
Definition at line 31 of file ac3dparse.c.
Referenced by GetBackGnd(), and ParseAC3D().
|
static |
Definition at line 28 of file ac3dparse.c.
Referenced by add_texture(), gen_triangles(), and reset_tex_table().