opengl.texture.coordinates: Add 'centroid' as part of the result in simple function to compute texture coordinates from a set of vertices.

This commit is contained in:
Rod Kay
2023-11-14 22:22:43 +11:00
parent ae8cee1cce
commit fa02760f9c
3 changed files with 38 additions and 32 deletions

View File

@@ -8,7 +8,14 @@ is
--- 2D
--
function to_Coordinates (the_Vertices : in Vector_2_array) return Coordinates_2D;
type Coords_2D_and_Centroid (coords_Count : Index_t) is
record
Coords : Coordinates_2D (1 .. coords_Count);
Centroid : Vector_2;
end record;
function to_Coordinates (the_Vertices : in Vector_2_array) return Coords_2D_and_Centroid;
--
-- Maps the vertices to texture coordinates.