A simple library that loads and parses Animated OBJ files written in C89
Disclaimer: Currently the library can only load models generated by editamo
To compile a static library, type
make
The outputted file has the name libamoloader.a by default
if you want to check the functionality of the library, run
make check
You can compare the output to tests/cube.amo
To install the library in the /usr path, run
make install
To include amoloader into your project:
- add
#include <amoloader.h>
to your .c file - In your Makefile, add
-L. -lamoloader
to your compile instruction
The library has only two functions:
struct amoloader_data *amo_load(const char *path, int *count)
int amo_destroy(struct amoloader_data *data, int count)
The amoloader_data
struct contains the parsed data
(See amoloader.h for more details)
#include "amoloader.h"
int main() {
int count;
struct amoloader_data *data = amo_load("path/to/amo_file.amo", &count);
if(data == NULL) {
fprintf(stderr, "Couldn't load amo file\n");
return -1;
}
/* Do stuff with the data */
amo_destroy(data, count);
return 0;
}
This project is licensed under the zlib license. See LICENSE for more details