13 #include <cglm/cglm.h>
void vec3array_push(Vec3Array *array, vec3 vertex)
Appends a vec3 to the array, reallocating if necessary.
Definition: icosphere.c:38
void icosphere_free(IcosphereGeometry *geom)
Frees all dynamic memory in the icosphere container.
Definition: icosphere.c:269
void uintarray_init(UintArray *array)
Initializes a UintArray with zeroed fields.
Definition: icosphere.c:65
void icosphere_generate(IcosphereGeometry *geom, int subdivisions)
Generates icosphere mesh data for a specified subdivision level.
Definition: icosphere.c:242
void icosphere_init(IcosphereGeometry *geom)
Initializes icosphere geometry buffers.
Definition: icosphere.c:235
void uintarray_push(UintArray *array, unsigned int value)
Appends an unsigned int to the array, reallocating if necessary.
Definition: icosphere.c:72
void vec3array_init(Vec3Array *array)
Initializes a Vec3Array with zeroed fields.
Definition: icosphere.c:31
void vec3array_free(Vec3Array *array)
Frees the internal buffer of a Vec3Array.
Definition: icosphere.c:56
void uintarray_free(UintArray *array)
Frees the internal buffer of a UintArray.
Definition: icosphere.c:90
Container for procedural mesh data.
Definition: icosphere.h:40
UintArray indices
Definition: icosphere.h:43
Vec3Array normals
Definition: icosphere.h:42
Vec3Array vertices
Definition: icosphere.h:41
Dynamic array for unsigned integers (mostly for mesh indices).
Definition: icosphere.h:30
size_t size
Definition: icosphere.h:32
size_t capacity
Definition: icosphere.h:33
unsigned int * data
Definition: icosphere.h:31
Dynamic array for cglm vec3 types.
Definition: icosphere.h:20
size_t capacity
Definition: icosphere.h:23
size_t size
Definition: icosphere.h:22
vec3 * data
Definition: icosphere.h:21