trimeshloader
1.0.0
Flexible ANSI C trimeshloader 3DS/OBJ
|
Typedefs | |
typedef struct tl3dsState | tl3dsState |
Structure describing the parsing state. More... | |
Functions | |
TRIMESH_LOADER_API tl3dsState * | tl3dsCreateState () |
Create a new parsing state. More... | |
TRIMESH_LOADER_API int | tl3dsResetState (tl3dsState *state) |
Reset the parsing state. More... | |
TRIMESH_LOADER_API void | tl3dsDestroyState (tl3dsState *state) |
Destroy a previously created state. More... | |
TRIMESH_LOADER_API int | tl3dsParse (tl3dsState *state, const char *buffer, unsigned int length, int last) |
Parse a chunk of data. More... | |
TRIMESH_LOADER_API unsigned int | tl3dsObjectCount (tl3dsState *state) |
TRIMESH_LOADER_API const char * | tl3dsObjectName (tl3dsState *state, unsigned int object) |
TRIMESH_LOADER_API unsigned int | tl3dsObjectFaceCount (tl3dsState *state, unsigned int object) |
TRIMESH_LOADER_API unsigned int | tl3dsObjectFaceIndex (tl3dsState *state, unsigned int object) |
TRIMESH_LOADER_API unsigned int | tl3dsMaterialCount (tl3dsState *state) |
TRIMESH_LOADER_API const char * | tl3dsMaterialName (tl3dsState *state, unsigned int object) |
TRIMESH_LOADER_API int | tl3dsGetMaterial (tl3dsState *state, unsigned int index, float *ambient, float *diffuse, float *specular, float *reflect) |
TRIMESH_LOADER_API unsigned int | tl3dsMaterialReferenceCount (tl3dsState *state) |
TRIMESH_LOADER_API const char * | tl3dsMaterialReferenceName (tl3dsState *state, unsigned int object) |
TRIMESH_LOADER_API int | tl3dsGetMaterialReference (tl3dsState *state, unsigned int index, unsigned int *face_index, unsigned int *face_count) |
TRIMESH_LOADER_API unsigned int | tl3dsVertexCount (tl3dsState *state) |
TRIMESH_LOADER_API int | tl3dsGetVertexDouble (tl3dsState *state, unsigned int index, double *x, double *y, double *z, double *tu, double *tv, double *nx, double *ny, double *nz) |
TRIMESH_LOADER_API int | tl3dsGetVertex (tl3dsState *state, unsigned int index, float *x, float *y, float *z, float *tu, float *tv, float *nx, float *ny, float *nz) |
TRIMESH_LOADER_API unsigned int | tl3dsFaceCount (tl3dsState *state) |
TRIMESH_LOADER_API int | tl3dsGetFaceInt (tl3dsState *state, unsigned int index, unsigned int *a, unsigned int *b, unsigned int *c) |
TRIMESH_LOADER_API int | tl3dsGetFace (tl3dsState *state, unsigned int index, unsigned short *a, unsigned short *b, unsigned short *c) |
TRIMESH_LOADER_API int | tl3dsCheckFileExtension (const char *filename) |
TRIMESH_LOADER_API unsigned int | tl3dsHasNormals (tl3dsState *state) |
Check if the loaded mesh has normals. More... | |
typedef struct tl3dsState tl3dsState |
Structure describing the parsing state.
the user has no direkt access to it.
TRIMESH_LOADER_API int tl3dsCheckFileExtension | ( | const char * | filename | ) |
TRIMESH_LOADER_API tl3dsState* tl3dsCreateState | ( | ) |
Create a new parsing state.
TRIMESH_LOADER_API void tl3dsDestroyState | ( | tl3dsState * | state | ) |
Destroy a previously created state.
state | pointer to an previously created state. |
TRIMESH_LOADER_API unsigned int tl3dsFaceCount | ( | tl3dsState * | state | ) |
TRIMESH_LOADER_API int tl3dsGetFace | ( | tl3dsState * | state, |
unsigned int | index, | ||
unsigned short * | a, | ||
unsigned short * | b, | ||
unsigned short * | c | ||
) |
TRIMESH_LOADER_API int tl3dsGetFaceInt | ( | tl3dsState * | state, |
unsigned int | index, | ||
unsigned int * | a, | ||
unsigned int * | b, | ||
unsigned int * | c | ||
) |
TRIMESH_LOADER_API int tl3dsGetMaterial | ( | tl3dsState * | state, |
unsigned int | index, | ||
float * | ambient, | ||
float * | diffuse, | ||
float * | specular, | ||
float * | reflect | ||
) |
TRIMESH_LOADER_API int tl3dsGetMaterialReference | ( | tl3dsState * | state, |
unsigned int | index, | ||
unsigned int * | face_index, | ||
unsigned int * | face_count | ||
) |
TRIMESH_LOADER_API int tl3dsGetVertex | ( | tl3dsState * | state, |
unsigned int | index, | ||
float * | x, | ||
float * | y, | ||
float * | z, | ||
float * | tu, | ||
float * | tv, | ||
float * | nx, | ||
float * | ny, | ||
float * | nz | ||
) |
TRIMESH_LOADER_API int tl3dsGetVertexDouble | ( | tl3dsState * | state, |
unsigned int | index, | ||
double * | x, | ||
double * | y, | ||
double * | z, | ||
double * | tu, | ||
double * | tv, | ||
double * | nx, | ||
double * | ny, | ||
double * | nz | ||
) |
TRIMESH_LOADER_API unsigned int tl3dsHasNormals | ( | tl3dsState * | state | ) |
Check if the loaded mesh has normals.
3DS does not support normals. It is for convenience only, and always returns 0.
state | a previously created state. |
TRIMESH_LOADER_API unsigned int tl3dsMaterialCount | ( | tl3dsState * | state | ) |
TRIMESH_LOADER_API const char* tl3dsMaterialName | ( | tl3dsState * | state, |
unsigned int | object | ||
) |
TRIMESH_LOADER_API unsigned int tl3dsMaterialReferenceCount | ( | tl3dsState * | state | ) |
TRIMESH_LOADER_API const char* tl3dsMaterialReferenceName | ( | tl3dsState * | state, |
unsigned int | object | ||
) |
TRIMESH_LOADER_API unsigned int tl3dsObjectCount | ( | tl3dsState * | state | ) |
TRIMESH_LOADER_API unsigned int tl3dsObjectFaceCount | ( | tl3dsState * | state, |
unsigned int | object | ||
) |
TRIMESH_LOADER_API unsigned int tl3dsObjectFaceIndex | ( | tl3dsState * | state, |
unsigned int | object | ||
) |
TRIMESH_LOADER_API const char* tl3dsObjectName | ( | tl3dsState * | state, |
unsigned int | object | ||
) |
TRIMESH_LOADER_API int tl3dsParse | ( | tl3dsState * | state, |
const char * | buffer, | ||
unsigned int | length, | ||
int | last | ||
) |
Parse a chunk of data.
state | a previously created state. |
buffer | pointer to the chunk of data to be parsed |
length | number of bytes to be parsed |
last | indicator if this is the last chunk. 1 = yes, 0 = no. |
TRIMESH_LOADER_API int tl3dsResetState | ( | tl3dsState * | state | ) |
Reset the parsing state.
state | pointer to an previously created state. |
TRIMESH_LOADER_API unsigned int tl3dsVertexCount | ( | tl3dsState * | state | ) |