trimeshloader
1.0.0
Flexible ANSI C trimeshloader 3DS/OBJ
|
Data Structures | |
struct | tlObject |
Structure describing an Object (or SubMesh, Batch) More... | |
struct | tlMaterial |
Structure describing a Material (Colors and/or Texture) More... | |
struct | tlMaterialReference |
Structure describing the reference to a Material. More... | |
struct | tlTrimesh |
Structure describing an Trimesh (index triangle list) containing objects, vertices (point, texture coordinate and normal) and triangle indices. More... | |
Macros | |
#define | TL_FVF_XYZ 1 |
Used as format flag in loading functions: load the position of the vertex. More... | |
#define | TL_FVF_UV 2 |
Used as format flag in loading functions: load the texturecoordinate of the vertex. More... | |
#define | TL_FVF_NORMAL 4 |
Used as format flag in loading functions: load the normal of the vertex. More... | |
Functions | |
TRIMESH_LOADER_API tlTrimesh * | tlLoad3DS (const char *filename, unsigned int vertex_format) |
Load a 3DS file in an tlTrimesh structure. More... | |
TRIMESH_LOADER_API tlTrimesh * | tlLoadOBJ (const char *filename, unsigned int vertex_format) |
Load a OBJ file in an tlTrimesh structure. More... | |
TRIMESH_LOADER_API tlTrimesh * | tlCreateTrimeshFromObjState (tlObjState *state, unsigned int vertex_format) |
Create an a tlTrimesh structure from a tlObjState. More... | |
TRIMESH_LOADER_API tlTrimesh * | tlCreateTrimeshFrom3dsState (tl3dsState *state, unsigned int vertex_format) |
Create an a tlTrimesh structure from a tl3dsState. More... | |
TRIMESH_LOADER_API void | tlTrimeshCreateNormals (tlTrimesh *trimesh) |
TRIMESH_LOADER_API tlTrimesh * | tlLoadTrimesh (const char *filename, unsigned int vertex_format) |
Load an 3DS or OBJ file in an tlTrimesh structure. More... | |
TRIMESH_LOADER_API void | tlDeleteTrimesh (tlTrimesh *trimesh) |
Delete an previously loaded tlTrimesh object. More... | |
#define TL_FVF_NORMAL 4 |
Used as format flag in loading functions: load the normal of the vertex.
#define TL_FVF_UV 2 |
Used as format flag in loading functions: load the texturecoordinate of the vertex.
#define TL_FVF_XYZ 1 |
Used as format flag in loading functions: load the position of the vertex.
TRIMESH_LOADER_API tlTrimesh* tlCreateTrimeshFrom3dsState | ( | tl3dsState * | state, |
unsigned int | vertex_format | ||
) |
Create an a tlTrimesh structure from a tl3dsState.
state | Pointer to state after parsing. |
vertex_format | Defines the vertex format. any format combination of TL_FVF_XYZ, TL_FVF_UV, TL_FVF_NORMAL |
TRIMESH_LOADER_API tlTrimesh* tlCreateTrimeshFromObjState | ( | tlObjState * | state, |
unsigned int | vertex_format | ||
) |
Create an a tlTrimesh structure from a tlObjState.
state | Pointer to state after parsing. |
vertex_format | Defines the vertex format. any format combination of TL_FVF_XYZ, TL_FVF_UV, TL_FVF_NORMAL |
TRIMESH_LOADER_API void tlDeleteTrimesh | ( | tlTrimesh * | trimesh | ) |
TRIMESH_LOADER_API tlTrimesh* tlLoad3DS | ( | const char * | filename, |
unsigned int | vertex_format | ||
) |
Load a 3DS file in an tlTrimesh structure.
filename | Pointer to NULL-terminated string containing the filename |
vertex_format | Defines the vertex format. any format combination of TL_FVF_XYZ, TL_FVF_UV, TL_FVF_NORMAL |
TRIMESH_LOADER_API tlTrimesh* tlLoadOBJ | ( | const char * | filename, |
unsigned int | vertex_format | ||
) |
Load a OBJ file in an tlTrimesh structure.
filename | Pointer to NULL-terminated string containing the filename |
vertex_format | Defines the vertex format. any format combination of TL_FVF_XYZ, TL_FVF_UV, TL_FVF_NORMAL |
TRIMESH_LOADER_API tlTrimesh* tlLoadTrimesh | ( | const char * | filename, |
unsigned int | vertex_format | ||
) |
Load an 3DS or OBJ file in an tlTrimesh structure.
Automatic extension parsing is done.
filename | Pointer to NULL-terminated string containing the filename |
vertex_format | Defines the vertex format. any format combination of TL_FVF_XYZ, TL_FVF_UV, TL_FVF_NORMAL |
TRIMESH_LOADER_API void tlTrimeshCreateNormals | ( | tlTrimesh * | trimesh | ) |