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-04-27 06:16:38 +08:00
|
|
|
#include "../endian.h"
|
2013-03-06 18:49:53 +08:00
|
|
|
#include "../transfer.h"
|
2013-03-05 23:46:42 +08:00
|
|
|
|
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-04-27 06:16:38 +08:00
|
|
|
void (*get_header_func) (const foug_stlb_geom_output_t*, uint8_t*); /* Optional */
|
2013-02-21 21:53:41 +08:00
|
|
|
uint32_t (*get_triangle_count_func)(const foug_stlb_geom_output_t*);
|
2013-03-06 18:49:53 +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-03-06 18:49:53 +08:00
|
|
|
/* foug_stlb_write() */
|
|
|
|
FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_write(const foug_stlb_geom_output_t* geom,
|
2013-04-27 06:16:38 +08:00
|
|
|
foug_transfer_t* trsf,
|
|
|
|
foug_endianness_t byte_order);
|
2013-03-06 18:49:53 +08:00
|
|
|
|
|
|
|
/* 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-04-27 06:16:38 +08:00
|
|
|
#define FOUG_STLB_WRITE_UNSUPPORTED_BYTE_ORDER 3
|
2013-01-15 20:10:44 +08:00
|
|
|
|
2013-03-06 17:27:37 +08:00
|
|
|
#endif /* FOUG_DATAX_C_LIBSTL_STLB_WRITE_H */
|