$darkmode
Procedural icosphere geometry generation. More...
#include <cglm/cglm.h>#include <stddef.h>Go to the source code of this file.
Data Structures | |
| struct | Vec3Array |
| Dynamic array for cglm vec3 types. More... | |
| struct | UintArray |
| Dynamic array for unsigned integers (mostly for mesh indices). More... | |
| struct | IcosphereGeometry |
| Container for procedural mesh data. More... | |
Functions | |
| void | vec3array_init (Vec3Array *array) |
| Initializes a Vec3Array with zeroed fields. More... | |
| void | vec3array_push (Vec3Array *array, vec3 vertex) |
| Appends a vec3 to the array, reallocating if necessary. More... | |
| void | vec3array_free (Vec3Array *array) |
| Frees the internal buffer of a Vec3Array. More... | |
| void | uintarray_init (UintArray *array) |
| Initializes a UintArray with zeroed fields. More... | |
| void | uintarray_push (UintArray *array, unsigned int value) |
| Appends an unsigned int to the array, reallocating if necessary. More... | |
| void | uintarray_free (UintArray *array) |
| Frees the internal buffer of a UintArray. More... | |
| void | icosphere_init (IcosphereGeometry *geom) |
| Initializes icosphere geometry buffers. More... | |
| void | icosphere_generate (IcosphereGeometry *geom, int subdivisions) |
| Generates icosphere mesh data for a specified subdivision level. More... | |
| void | icosphere_free (IcosphereGeometry *geom) |
| Frees all dynamic memory in the icosphere container. More... | |
Procedural icosphere geometry generation.
This module provides utilities for generating smooth, subdivided spheres starting from an icosahedron. It includes dynamic arrays for internal geometry processing.
| void icosphere_free | ( | IcosphereGeometry * | geom | ) |
Frees all dynamic memory in the icosphere container.
| geom | Pointer to the geometry container. |
| void icosphere_generate | ( | IcosphereGeometry * | geom, |
| int | subdivisions | ||
| ) |
Generates icosphere mesh data for a specified subdivision level.
| geom | Pointer to the geometry container. |
| subdivisions | Number of times to split each triangle face (0-6). |
| void icosphere_init | ( | IcosphereGeometry * | geom | ) |
Initializes icosphere geometry buffers.
| geom | Pointer to the geometry container. |
| void uintarray_push | ( | UintArray * | array, |
| unsigned int | value | ||
| ) |
Appends an unsigned int to the array, reallocating if necessary.
| void vec3array_push | ( | Vec3Array * | array, |
| vec3 | vertex | ||
| ) |
Appends a vec3 to the array, reallocating if necessary.