al_triangulate_polygon(3)
π al_triangulate_polygon(3) β Library Functions Manual π
πΈ NAME πΈ
okay so al_triangulate_polygon β Allegro 5 API. That's the name, bestie, and this is literally its whole manual moment. periodt. π
β¨ SYNOPSIS β¨
#include <allegro5/allegro_primitives.h>
bool al_triangulate_polygon(
const float* vertices, size_t vertex_stride, const int* vertex_counts,
void (*emit_triangle)(int, int, int, void*), void* userdata)
π¦ DESCRIPTION π¦
bestie, this one divides a simple polygon into triangles, with zero or more other simple polygons subtracted from it β the holes. The holes cannot touch or intersect with the outline of the main polygon. Simple means the polygon does not have to be convex but must not be self-overlapping.
π¨ caveat check: holes cannot touch or intersect with the outline of the main polygon, and the polygon must not be self-overlapping. no cap, that part matters. π
π Parameters π
verticesβ an interleaved array of(x, y)vertex coordinates for each of the polygons, including holes. πvertex_strideβ the distance (in bytes) between successive pairs of vertices in the array. π¦vertex_countsβ number of vertices for each polygon. The number of vertices in the main polygon is given byvertex_counts[0]and must be at least three. Subsequent elements indicate the number of vertices in each hole. The array must be terminated with an element with value zero. πemit_triangleβ a function to be called for every set of three points that form a triangle. The function is passed the indices of the points inverticesanduserdata. π₯userdataβ arbitrary data to be passed toemit_triangle. π
π₯ SINCE π₯
5.1.0 β¨ β that's the version, bestie. it's been giving since 5.1.0, fr fr.
π SEE ALSO π
al_draw_filled_polygon_with_holes(3) β go read that one too, bestie. iykyk. π«Ά
β Allegro reference manual Β· Allegro 5 API Β· al_triangulate_polygon(3) Β· date? not printed in this footer, so don't come for me ππ
π¦ where this page comes from
- arch rolling: allegro 5.2.11.3-2 Β· Zlib AND BSD-3-Clause AND OFL-1.1 AND LicenseRef-Custom
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms