2013-03-03 05:05:17 +08:00
|
|
|
#ifndef FOUG_C_LIBSTL_STLA_READ_H
|
|
|
|
#define FOUG_C_LIBSTL_STLA_READ_H
|
|
|
|
|
|
|
|
#include "stl_global.h"
|
|
|
|
#include "stl_triangle.h"
|
2013-03-05 08:04:29 +08:00
|
|
|
#include "../error.h"
|
2013-03-03 05:05:17 +08:00
|
|
|
#include "../stream.h"
|
|
|
|
#include "../task_control.h"
|
|
|
|
|
|
|
|
/* foug_stla_geom_input */
|
|
|
|
typedef struct foug_stla_geom_input foug_stla_geom_input_t;
|
|
|
|
struct foug_stla_geom_input
|
|
|
|
{
|
|
|
|
void* cookie;
|
|
|
|
void (*begin_solid_func)(foug_stla_geom_input_t*, const char* name);
|
|
|
|
void (*process_next_triangle_func)(foug_stla_geom_input_t*, const foug_stl_triangle_t*);
|
|
|
|
void (*end_solid_func)(foug_stla_geom_input_t*, const char* name);
|
|
|
|
/* void (*parse_error_func)(foug_stla_geom_input_t*, size_t, size_t); */
|
|
|
|
};
|
|
|
|
|
|
|
|
/* foug_stla_read_args */
|
|
|
|
typedef struct foug_stla_read_args
|
|
|
|
{
|
|
|
|
foug_stla_geom_input_t geom_input;
|
|
|
|
foug_stream_t stream;
|
|
|
|
foug_task_control_t task_control;
|
|
|
|
char* buffer;
|
|
|
|
uint32_t buffer_size;
|
|
|
|
size_t data_size_hint;
|
|
|
|
} foug_stla_read_args_t;
|
|
|
|
|
2013-03-05 05:04:21 +08:00
|
|
|
FOUG_DATAX_LIBSTL_EXPORT
|
2013-03-03 05:05:17 +08:00
|
|
|
int foug_stla_read(foug_stla_read_args_t* args);
|
|
|
|
|
2013-03-05 08:04:29 +08:00
|
|
|
/* Error codes returned by foug_stla_read() */
|
|
|
|
#define FOUG_STLA_READ_PARSE_ERROR 1
|
2013-03-03 05:05:17 +08:00
|
|
|
|
|
|
|
#endif /* FOUG_C_LIBSTL_STLA_READ_H */
|