Skip to content
/ cl-fbx Public
forked from Shirakumo/cl-fbx

Bindings to ufbx, a library for parsing FBX model files

License

Notifications You must be signed in to change notification settings

surabax/cl-fbx

 
 

Repository files navigation

## About cl-fbx
This is a wrapper library around "ufbx"(https://github.com/ufbx/ufbx), a C library for parsing the FBX 3D model file format. As the library and structures involved are quite large, please refer to the C library for more detailed documentation on the individual structures, functions, and fields.

## How To
First, load the library, and then parse a file:

:: common lisp
(org.shirakumo.fraf.fbx:with-file (file #p"my-model.fbx")
  (describe file))
::

Files can be loaded from a file on disk, an octet stream, an octet vector, or a direct memory pointer.

When you are done with the file, you must ``free`` it to clear out any foreign memory resources taken up by it. Other calls may also return fresh instances that must be manually freed as appropriate. For most cases, using ``with-freeing`` should help to ensure data does not get retained more than necessary.

All structures returned by the library are wrapped in ``wrapper`` instances, which are thin instances that give more convenient Lisp-side access to the data. For lists, a ``foreign-vector`` is returned, which can be indexed with the standard sequence functions on implementations supporting the extensible-sequences protocol.

You can at any time also invoke ``describe`` on an instance to get a listing of all the slots and their contents. This should make it much easier to traverse the data.

## Included Sources
The following source files are included in this repository:

- "ufbx.h"(https://github.com/ufbx/ufbx)
- "ufbx.c"(https://github.com/ufbx/ufbx)
- "glibc-2.13.h"(https://github.com/wheybags/glibc_version_header/blob/master/version_headers/x64/force_link_glibc_2.13.h)

About

Bindings to ufbx, a library for parsing FBX model files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 79.6%
  • C++ 11.3%
  • Common Lisp 9.0%
  • Makefile 0.1%