ufbx
1.0.0
단일 소스 파일 FBX 파일 로더.
ufbx_load_opts opts = { 0 }; // Optional, pass NULL for defaults
ufbx_error error; // Optional, pass NULL if you don't care about errors
ufbx_scene *scene = ufbx_load_file( " thing.fbx " , &opts, &error);
if (!scene) {
fprintf (stderr, " Failed to load: %s n " , error. description . data );
exit ( 1 );
}
// Use and inspect `scene`, it's just plain data!
// Let's just list all objects within the scene for example:
for ( size_t i = 0 ; i < scene->nodes.count; i++) {
ufbx_node *node = scene-> nodes . data [i];
if (node-> is_root ) continue ;
printf ( " Object: %s n " , node-> name . data );
if (node-> mesh ) {
printf ( " -> mesh with %zu faces n " , node-> mesh -> faces . count );
}
}
ufbx_free_scene (scene);온라인 문서
ufbx.h 및 ufbx.c 프로젝트에 복사하십시오. ufbx.c C99/C ++ 11 이상으로 편집해야합니다. misc/ufbx.natvis 를 추가하여 유형에 대한 디버그 형식을 얻을 수도 있습니다.
목표는 공식 FBX SDK와 함께 기능 패리티에있는 것입니다.
.obj 파일도 지원합니다 라이브러리는 휴대용 C (C ++로 컴파일)로 작성되며 수정없이 거의 모든 플랫폼에서 작동해야합니다. 알려지지 않은 컴파일러 (msvc/clang/gcc/tcc 아님)에서 pre-c11/c ++ 11으로 컴파일 된 경우 C99가 원자력을 지원하지 않으므로 일부 기능은 스레드 안전하지 않습니다.
다음 플랫폼은 CI에서 테스트하고 비트 발행 결과를 생성합니다.
master 브랜치의 최신 커밋에는 최신 안정 버전의 라이브러리가 포함되어 있습니다.
이전 버전은 vX.YZ 로 태그가 지정되고 패치 업데이트 ( Z )는 ABI 호환이며 동일한 마이너 버전 ( Y )의 이전 버전의 헤더와 작동합니다. 주요 구절 ( X ) 내의 작은 버전은 1.0.0 이후에 소스 호환 될 것으로 예상되지만 0.YZ 릴리스는마다 작은 릴리스마다 파괴 될 수 있습니다.
------------------------------------------------------------------------------
This software is available under 2 licenses -- choose whichever you prefer.
------------------------------------------------------------------------------
ALTERNATIVE A - MIT License
Copyright (c) 2020 Samuli Raivio
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
------------------------------------------------------------------------------
ALTERNATIVE B - Public Domain (www.unlicense.org)
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this
software, either in source code form or as a compiled binary, for any purpose,
commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this
software dedicate any and all copyright interest in the software to the public
domain. We make this dedication for the benefit of the public at large and to
the detriment of our heirs and successors. We intend this dedication to be an
overt act of relinquishment in perpetuity of all present and future rights to
this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
----------------------------------------