- return (const char *)(mdl_baseptr( mdl, mdl->strings_offset )) + pstr;
-}
-
-static mdl_node *mdl_node_from_id( mdl_header *mdl, u32 id )
-{
- return ((mdl_node *)mdl_baseptr( mdl, mdl->node_offset )) + id;
-}
-
-static mdl_node *mdl_node_from_name( mdl_header *mdl, const char *name )
-{
- for( int i=0; i<mdl->node_count; i++ )
- {
- mdl_node *pnode = mdl_node_from_id( mdl, i );
-
- if( !strcmp( name, mdl_pstr( mdl, pnode->pstr_name )) )
- return pnode;
- }
-
- return NULL;
-}
-
-static mdl_submesh *mdl_submesh_from_id( mdl_header *mdl, u32 id )
-{
- if( id >= mdl->submesh_count )
- return NULL;
-
- return ((mdl_submesh *)mdl_baseptr( mdl, mdl->submesh_offset )) + id;
-}
-
-static mdl_submesh *mdl_node_submesh( mdl_header *mdl, mdl_node *node, u32 i )
-{
- if( i >= node->submesh_count )
- return NULL;
-
- return mdl_submesh_from_id( mdl, node->submesh_start+i );
-}
-
-static u32 *mdl_submesh_indices( mdl_header *mdl, mdl_submesh *sm )
-{
- return ((u32 *)mdl_baseptr( mdl, mdl->indice_offset )) + sm->indice_start;
-}
-
-static mdl_vert *mdl_submesh_vertices( mdl_header *mdl, mdl_submesh *sm )
-{
- return ((mdl_vert *)mdl_baseptr(mdl,mdl->vertex_offset)) + sm->vertex_start;
-}
-
-static mdl_material *mdl_material_from_id( mdl_header *mdl, u32 id )
-{
- return ((mdl_material *)mdl_baseptr(mdl,mdl->material_offset)) + id;
-}
-
-static mdl_animation *mdl_animation_from_id( mdl_header *mdl, u32 id )
-{
- return ((mdl_animation *)mdl_baseptr(mdl,mdl->anim_offset)) + id;
-}
-
-static void mdl_node_transform( mdl_node *pnode, m4x3f transform )
-{
- q_m3x3( pnode->q, transform );
- v3_muls( transform[0], pnode->s[0], transform[0] );
- v3_muls( transform[1], pnode->s[1], transform[1] );
- v3_muls( transform[2], pnode->s[2], transform[2] );
- v3_copy( pnode->co, transform[3] );