From 38a71a0e8eb25418f6a0be23960a30de566dfb7c Mon Sep 17 00:00:00 2001 From: sanine Date: Sun, 8 Jan 2023 22:35:38 -0600 Subject: add kai_parse_float_array --- include/kalmia.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) (limited to 'include/kalmia.h') diff --git a/include/kalmia.h b/include/kalmia.h index 20e5f4f..524072b 100644 --- a/include/kalmia.h +++ b/include/kalmia.h @@ -63,6 +63,68 @@ typedef float ka_real_t; #endif +/**************** geometry types ****************/ + +struct ka_float_array_t { + char *id; + size_t count; + ka_real_t *data; +}; + + +struct ka_param_t { + char *name; + char *type; +}; + + +struct ka_accessor_t { + size_t count; + size_t offset; + char *source; + size_t stride; + + struct ka_param_t *param; + size_t param_count; +}; + + +struct ka_technique_common_t { + struct ka_accessor_t accessor; +}; + + +struct ka_source_t { + char *id; + struct ka_float_array_t float_array; + struct ka_technique_common_t technique_common; +}; + + +struct ka_vertices_t { +}; + + +struct ka_triangles_t { +}; + + +struct ka_mesh_t { + struct ka_source_t *source; + size_t source_count; + + struct ka_vertices_t vertices; + + struct ka_triangles_t *triangles; + size_t triangles_count; +}; + + +struct ka_geometry_t { + struct ka_mesh_t mesh; +}; + + typedef ka_real_t ka_matrix_t[16]; -- cgit v1.2.1