9#define LG_MESH_NAME_MAX_LEN (64 - 1)
10#define MAT_NAME_MAX_LEN (64 - 1)
11#define TEX_FILENAME_MAX_LEN (128 - 1)
12#define N_MAX_MAT_PER_OBJ 64
13#define N_MAX_USEMTL_PER_OBJ 256
15#define BINARY_MESH_EXT "bmesh"
16#define LG_BMESH_HEADER_SIZE 65536
18#define LG_FLOAT_EPSILON (1e-6)
19#define MAX_U32BIT_VALUE 4294967296
21#define CHECK_PATH(_z_) INFO_OUT("DEBUG: [%s %d]: %s() -> %s\n", basename2(__FILE__), __LINE__, __func__, _z_)
26#define LG_MESH_IS_RH 1
27#define LG_MESH_IS_LH 2
38 char name[MAT_NAME_MAX_LEN + 1];
41 char tex_filename[TEX_FILENAME_MAX_LEN + 1];
86 char name[LG_MESH_NAME_MAX_LEN + 1];
103 char mtl_file[LG_MESH_NAME_MAX_LEN + 1];
110 zboolean xyz_normalized;
112 zboolean horiz_centered;
113 zboolean vert_centered;
114 zboolean vert_bottom;
119 zboolean save_to_assets;
121 zboolean normalize_xyz;
122 zboolean horiz_center;
123 zboolean vert_center;
124 zboolean vert_bottom;
128#define SAVE_TO_ASSETS TRUE
130#define NORMALIZE_XYZ TRUE
131#define HORIZ_CENTER TRUE
132#define VERT_CENTER TRUE
133#define VERT_BOTTOM TRUE
157 char name[MAT_NAME_MAX_LEN + 1];
159 uint32_t texture_big;
160 uint32_t texture_little;
161 char tex_filename[TEX_FILENAME_MAX_LEN + 1];
166 char name[LG_MESH_NAME_MAX_LEN + 1];
168 uint32_t vbo_data_big;
169 uint32_t vbo_data_little;
170 uint32_t ibo_data_big;
171 uint32_t ibo_data_little;
178 char mtl_file[LG_MESH_NAME_MAX_LEN + 1];
185 zboolean xyz_normalized;
187 zboolean horiz_centered;
188 zboolean vert_centered;
189 zboolean vert_bottom;
LG_Mesh * lg_mesh_load_easy(const char *relative_path, zboolean force_reload_objs, LG_LoadMesh_Flags flags1)
Definition lg_mesh.c:154
int lg_mesh_reload_mats(LG_Mesh *mesh)
Definition lg_mesh.c:435
LG_LoadMesh_Flags lg_loadmesh_flags(zboolean save_to_assets, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:589
int lg_bmesh_load_from_file(const char *full_path, LG_Mesh **mesh)
Definition lg_mesh.c:348
void lg_serialize_LG_Material_64_to_32(Serializable_LG_Material *s_mat, LG_Material *mat)
Definition lg_mesh.c:456
void lg_unserialize_LG_Material_32_to_64(LG_Material *mat, Serializable_LG_Material *s_mat)
Definition lg_mesh.c:471
void lg_unserialize_LG_Mesh_32_to_64(LG_Mesh *mesh, Serializable_LG_Mesh *s_mesh)
Definition lg_mesh.c:531
void lg_serialize_LG_Mesh_64_to_32(Serializable_LG_Mesh *s_mesh, LG_Mesh *mesh)
Definition lg_mesh.c:485
LG_Mesh * lg_mesh_load(const char *relative_path, LG_LoadMesh_Flags flags)
Definition lg_mesh.c:72
LG_Mesh * lg_mesh_new_from_objfile(const char *relative_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:214
int lg_bmesh_save_to_file(const char *full_path, LG_Mesh *mesh)
Definition lg_mesh.c:291
void lg_mesh_info(LG_Mesh *mesh)
Definition lg_mesh.c:605
void lg_mesh_free(LG_Mesh *mesh)
Definition lg_mesh.c:252
LG_Mesh * lg_mesh_new_from_fbxfile(const char *relative_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:242
char * lg_replace_file_extension(const char *path, const char *new_ext)
Definition lg_mesh.c:703
Definition lg_3d_primitives.h:67
Definition lg_textures.h:45
Definition lg_3d_primitives.h:53
Definition lg_vertex.h:46
Definition lg_vertex.h:62