9#define LG_MESH_NAME_MAX_LEN (512 - 1)
10#define LG_MESH_FULLPATH_MAX_LEN (512 - 1)
11#define MAT_NAME_MAX_LEN (64 - 1)
12#define TEX_FILENAME_MAX_LEN (512 - 1)
14#define N_NEWMTL_USEMTL_TAGS_MAX 4096
16#define BINARY_MESH_EXT "bmesh"
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_)
23#define LG_MESH_IS_RH 1
24#define LG_MESH_IS_LH 2
40 char name[MAT_NAME_MAX_LEN + 1];
42 char tex_full_path[TEX_FILENAME_MAX_LEN + 1];
87 char full_path[LG_MESH_FULLPATH_MAX_LEN + 1];
103 char mtl_file[LG_MESH_FULLPATH_MAX_LEN + 1];
108 uint32_t i_mat_in_vbo[N_NEWMTL_USEMTL_TAGS_MAX];
109 uint32_t i_mat_in_lib[N_NEWMTL_USEMTL_TAGS_MAX];
113 zboolean xyz_normalized;
115 zboolean horiz_centered;
116 zboolean vert_centered;
117 zboolean vert_bottom;
122 zboolean save_to_assets;
124 zboolean normalize_xyz;
125 zboolean horiz_center;
126 zboolean vert_center;
127 zboolean vert_bottom;
131#define SAVE_TO_ASSETS TRUE
133#define NORMALIZE_XYZ TRUE
134#define HORIZ_CENTER TRUE
135#define VERT_CENTER TRUE
136#define VERT_BOTTOM TRUE
160 char name[MAT_NAME_MAX_LEN + 1];
161 uint32_t texture_big;
162 uint32_t texture_little;
163 char tex_full_path[TEX_FILENAME_MAX_LEN + 1];
168 char full_path[LG_MESH_FULLPATH_MAX_LEN + 1];
170 uint32_t vbo_data_big;
171 uint32_t vbo_data_little;
172 uint32_t ibo_data_big;
173 uint32_t ibo_data_little;
180 char mtl_file[LG_MESH_FULLPATH_MAX_LEN + 1];
184 uint32_t i_mat_in_vbo[N_NEWMTL_USEMTL_TAGS_MAX];
185 uint32_t i_mat_in_lib[N_NEWMTL_USEMTL_TAGS_MAX];
189 zboolean xyz_normalized;
191 zboolean horiz_centered;
192 zboolean vert_centered;
193 zboolean vert_bottom;
void lg_mesh_info(LG_Mesh *mesh, int show_first_n)
Definition lg_mesh.c:638
LG_Mesh * lg_mesh_new_from_fbx(const char *full_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:234
int lg_mesh_reload_mats(LG_Mesh *mesh)
Definition lg_mesh.c:464
void lg_mesh_free_v2(LG_Mesh **mesh)
Definition lg_mesh.c:291
LG_Mesh * lg_mesh_new_from_obj_relpath(const char *relative_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:208
LG_Mesh * lg_mesh_new_from_fbx_relpath(const char *relative_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:250
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:621
int lg_bmesh_load_from_file(const char *full_path, LG_Mesh **mesh)
Definition lg_mesh.c:375
void lg_serialize_LG_Material_64_to_32(Serializable_LG_Material *s_mat, LG_Material *mat)
Definition lg_mesh.c:486
void lg_unserialize_LG_Material_32_to_64(LG_Material *mat, Serializable_LG_Material *s_mat)
Definition lg_mesh.c:500
void lg_unserialize_LG_Mesh_32_to_64(LG_Mesh *mesh, Serializable_LG_Mesh *s_mesh)
Definition lg_mesh.c:561
void lg_serialize_LG_Mesh_64_to_32(Serializable_LG_Mesh *s_mesh, LG_Mesh *mesh)
Definition lg_mesh.c:513
LG_Mesh * lg_mesh_new_from_obj(const char *full_path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom)
Definition lg_mesh.c:182
int lg_bmesh_save_to_file(const char *full_path, LG_Mesh *mesh)
Definition lg_mesh.c:316
void lg_mesh_free(LG_Mesh *mesh)
Definition lg_mesh.c:260
char * lg_replace_file_extension(const char *path, const char *new_ext)
Definition lg_mesh.c:743
LG_Mesh * lg_mesh_load(const char *full_path, LG_LoadMesh_Flags flags)
Definition lg_mesh.c:104
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