Skip to main content

Module unity_mesh

Module unity_mesh 

Source

Functions§

gltforge_mesh_count
Return the number of meshes in the document.
gltforge_mesh_index_format
Return 16 or 32 indicating the index format for mesh mesh_idx. The format is uniform across all sub-meshes and is determined by total vertex count.
gltforge_mesh_name
Return the name of mesh mesh_idx as UTF-8 bytes (not null-terminated). Always non-null — unnamed meshes use their index as the name. out_len receives the byte length.
gltforge_mesh_normals
Return a pointer to the normal data for mesh mesh_idx. out_len receives the total number of f32 values (vertex_count × 3). Returns null with out_len = 0 if the mesh has no normals.
gltforge_mesh_positions
Return a pointer to the position data for mesh mesh_idx. out_len receives the total number of f32 values (vertex_count × 3).
gltforge_mesh_tangents
Return a pointer to the tangent data for mesh mesh_idx. out_len receives the total number of f32 values (vertex_count × 4). Returns null with out_len = 0 if the mesh has no tangents.
gltforge_mesh_uv_channel_count
Return the number of UV channels for mesh mesh_idx.
gltforge_mesh_uvs
Return a pointer to the UV data for mesh mesh_idx, channel channel. out_len receives the total number of f32 values (vertex_count × 2). Returns null with out_len = 0 if the channel is absent.
gltforge_mesh_vertex_count
Return the total vertex count for mesh mesh_idx (across all sub-meshes).