![]() |
LibGame
v0.4.0
The LG Game Engine - Copyright (C) 2024-2025 ETMSoftware
|
Functions | |
LG_Mesh * | lg_fbx2vbo (const char *path, zboolean invert_z, zboolean normalize_xyz, zboolean horiz_center, zboolean vert_center, zboolean vert_bottom) |
void | lg_vb_uvn_iw_info (Vertex_uvn_iw *vb_data, uint32_t vb_size, int n_lines_max, const char *line_start, zboolean is_triangle_mesh) |
=== The FBX file parser ===
We use the excellent ufbx lib, by Samuli Raivio.
At the moment, the aim is to read skinned meshes, as OBJ files don't support them.
See: https://ufbx.github.io and https://github.com/ufbx/ufbx
LG_Mesh* lg_fbx2vbo | ( | const char * | path, |
zboolean | invert_z, | ||
zboolean | normalize_xyz, | ||
zboolean | horiz_center, | ||
zboolean | vert_center, | ||
zboolean | vert_bottom | ||
) |
Parse a FBX file to build a skinned mesh
Will create a Vertex_uvn_iw VBO (see lg_vertex.h)
path | FBX file path |
invert_z | Invert z spatial coord (left_handed vs right_handed coords sys) - STILL EXPERIMENTAL |
normalize_xyz | Normalize spatial coords |
horiz_center | Center mesh horizontally |
vert_center | Center mesh vertically, if vert_bottom is not set |
vert_bottom | Set mesh origin vertically at bottom, override vert_center |
void lg_vb_uvn_iw_info | ( | Vertex_uvn_iw * | vb_data, |
uint32_t | vb_size, | ||
int | n_lines_max, | ||
const char * | line_start, | ||
zboolean | is_triangle_mesh | ||
) |
Print out nicely a Vertex_uvn_iw buffer info spatial coords (only)
v[1/2/3] applies only for triangle meshes
vb_data | Pointer to a Vertex_uvn_iw buffer |
vb_size | Buffer size (uint32_t) |
n_lines_max | Print out up to n_lines_max lines |
line_start | String starting each line |
is_triangle_mesh |