libstl: reorganize declarations of read/write functions
This commit is contained in:
parent
1401860c83
commit
a11ae5157c
@ -7,6 +7,14 @@
|
||||
#include "../stream.h"
|
||||
#include "../task_control.h"
|
||||
|
||||
/* foug_stla_read() */
|
||||
typedef struct foug_stla_read_args foug_stla_read_args_t;
|
||||
|
||||
FOUG_DATAX_LIBSTL_EXPORT int foug_stla_read(foug_stla_read_args_t* args);
|
||||
|
||||
/* Specific error codes returned by foug_stla_read() */
|
||||
#define FOUG_STLA_READ_PARSE_ERROR 1
|
||||
|
||||
/* foug_stla_geom_input */
|
||||
typedef struct foug_stla_geom_input foug_stla_geom_input_t;
|
||||
struct foug_stla_geom_input
|
||||
@ -19,7 +27,7 @@ struct foug_stla_geom_input
|
||||
};
|
||||
|
||||
/* foug_stla_read_args */
|
||||
typedef struct foug_stla_read_args
|
||||
struct foug_stla_read_args
|
||||
{
|
||||
foug_stla_geom_input_t geom_input;
|
||||
foug_stream_t stream;
|
||||
@ -27,12 +35,6 @@ typedef struct foug_stla_read_args
|
||||
char* buffer;
|
||||
uint32_t buffer_size;
|
||||
size_t data_size_hint;
|
||||
} foug_stla_read_args_t;
|
||||
|
||||
FOUG_DATAX_LIBSTL_EXPORT
|
||||
int foug_stla_read(foug_stla_read_args_t* args);
|
||||
|
||||
/* Error codes returned by foug_stla_read() */
|
||||
#define FOUG_STLA_READ_PARSE_ERROR 1
|
||||
};
|
||||
|
||||
#endif /* FOUG_C_LIBSTL_STLA_READ_H */
|
||||
|
@ -7,6 +7,15 @@
|
||||
#include "../stream.h"
|
||||
#include "../task_control.h"
|
||||
|
||||
/* foug_stlb_read() */
|
||||
typedef struct foug_stlb_read_args foug_stlb_read_args_t;
|
||||
|
||||
FOUG_DATAX_LIBSTL_EXPORT int foug_stlb_read(foug_stlb_read_args_t* args);
|
||||
|
||||
/* Specific error codes returned by foug_stlb_read() */
|
||||
#define FOUG_STLB_READ_HEADER_WRONG_SIZE_ERROR 1
|
||||
#define FOUG_STLB_READ_FACET_COUNT_ERROR 2
|
||||
|
||||
/* foug_stlb_geom_input */
|
||||
typedef struct foug_stlb_geom_input foug_stlb_geom_input_t;
|
||||
struct foug_stlb_geom_input
|
||||
@ -19,20 +28,13 @@ struct foug_stlb_geom_input
|
||||
};
|
||||
|
||||
/* foug_stlb_read_args */
|
||||
typedef struct foug_stlb_read_args
|
||||
struct foug_stlb_read_args
|
||||
{
|
||||
foug_stlb_geom_input_t geom_input;
|
||||
foug_stream_t stream;
|
||||
foug_task_control_t task_control;
|
||||
uint8_t* buffer;
|
||||
uint32_t buffer_size;
|
||||
} foug_stlb_read_args_t;
|
||||
|
||||
FOUG_DATAX_LIBSTL_EXPORT
|
||||
int foug_stlb_read(foug_stlb_read_args_t* args);
|
||||
|
||||
/* Error codes returned by foug_stlb_read() */
|
||||
#define FOUG_STLB_READ_HEADER_WRONG_SIZE_ERROR 1
|
||||
#define FOUG_STLB_READ_FACET_COUNT_ERROR 2
|
||||
};
|
||||
|
||||
#endif /* FOUG_C_LIBSTL_STLB_READ_H */
|
||||
|
@ -7,31 +7,33 @@
|
||||
#include "../stream.h"
|
||||
#include "../task_control.h"
|
||||
|
||||
/* 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
|
||||
|
||||
/* foug_stlb_geom_output */
|
||||
typedef struct foug_stlb_geom_output foug_stlb_geom_output_t;
|
||||
struct foug_stlb_geom_output
|
||||
{
|
||||
void* cookie;
|
||||
void (*get_header_func)(const foug_stlb_geom_output_t*, uint8_t*);
|
||||
void (*get_header_func)(const foug_stlb_geom_output_t*, uint8_t*);
|
||||
uint32_t (*get_triangle_count_func)(const foug_stlb_geom_output_t*);
|
||||
void (*get_triangle_func)(const foug_stlb_geom_output_t*, uint32_t, foug_stlb_triangle_t*);
|
||||
void (*get_triangle_func)(const foug_stlb_geom_output_t*, uint32_t, foug_stlb_triangle_t*);
|
||||
};
|
||||
|
||||
/* foug_stlb_write_args */
|
||||
typedef struct foug_stlb_write_args
|
||||
struct foug_stlb_write_args
|
||||
{
|
||||
foug_stlb_geom_output_t geom_output;
|
||||
foug_stream_t stream;
|
||||
foug_task_control_t task_control;
|
||||
uint8_t* buffer;
|
||||
uint32_t buffer_size;
|
||||
} foug_stlb_write_args_t;
|
||||
|
||||
FOUG_DATAX_LIBSTL_EXPORT
|
||||
int foug_stlb_write(foug_stlb_write_args_t* args);
|
||||
|
||||
/* 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
|
||||
};
|
||||
|
||||
#endif /* FOUG_C_LIBSTL_STLB_WRITE_H */
|
||||
|
Loading…
Reference in New Issue
Block a user