2013-03-06 17:27:37 +08:00
|
|
|
#ifndef FOUG_DATAX_C_LIBSTL_STLB_WRITE_H
|
|
|
|
#define FOUG_DATAX_C_LIBSTL_STLB_WRITE_H
|
2013-01-15 20:10:44 +08:00
|
|
|
|
2013-01-15 23:45:01 +08:00
|
|
|
#include "stl_global.h"
|
2013-02-21 21:53:41 +08:00
|
|
|
#include "stlb_triangle.h"
|
2013-03-05 08:04:29 +08:00
|
|
|
#include "../error.h"
|
2013-01-15 20:10:44 +08:00
|
|
|
#include "../stream.h"
|
|
|
|
#include "../task_control.h"
|
|
|
|
|
2013-03-05 23:46:42 +08:00
|
|
|
/* foug_stlb_write() */
|
|
|
|
typedef struct foug_stlb_write_args foug_stlb_write_args_t;
|
|
|
|
|
|
|
|
FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_write(foug_stlb_write_args_t* args);
|
|
|
|
|
|
|
|
/* Specific error codes returned by foug_stlb_write() */
|
|
|
|
#define FOUG_STLB_WRITE_NULL_GET_TRIANGLE_COUNT_FUNC 1
|
|
|
|
#define FOUG_STLB_WRITE_NULL_GET_TRIANGLE_FUNC 2
|
|
|
|
|
2013-03-03 04:51:08 +08:00
|
|
|
/* foug_stlb_geom_output */
|
|
|
|
typedef struct foug_stlb_geom_output foug_stlb_geom_output_t;
|
|
|
|
struct foug_stlb_geom_output
|
2013-01-15 20:10:44 +08:00
|
|
|
{
|
2013-03-03 04:51:08 +08:00
|
|
|
void* cookie;
|
2013-03-05 23:46:42 +08:00
|
|
|
void (*get_header_func)(const foug_stlb_geom_output_t*, uint8_t*);
|
2013-02-21 21:53:41 +08:00
|
|
|
uint32_t (*get_triangle_count_func)(const foug_stlb_geom_output_t*);
|
2013-03-05 23:46:42 +08:00
|
|
|
void (*get_triangle_func)(const foug_stlb_geom_output_t*, uint32_t, foug_stlb_triangle_t*);
|
2013-03-03 04:51:08 +08:00
|
|
|
};
|
2013-01-15 20:10:44 +08:00
|
|
|
|
2013-02-21 21:53:41 +08:00
|
|
|
/* foug_stlb_write_args */
|
2013-03-05 23:46:42 +08:00
|
|
|
struct foug_stlb_write_args
|
2013-01-15 20:10:44 +08:00
|
|
|
{
|
2013-03-03 04:51:08 +08:00
|
|
|
foug_stlb_geom_output_t geom_output;
|
|
|
|
foug_stream_t stream;
|
|
|
|
foug_task_control_t task_control;
|
2013-02-05 19:24:13 +08:00
|
|
|
uint8_t* buffer;
|
2013-01-15 20:10:44 +08:00
|
|
|
uint32_t buffer_size;
|
2013-03-05 23:46:42 +08:00
|
|
|
};
|
2013-01-15 20:10:44 +08:00
|
|
|
|
2013-03-06 17:27:37 +08:00
|
|
|
#endif /* FOUG_DATAX_C_LIBSTL_STLB_WRITE_H */
|