gel.sprite: Add 'user_Data'.

This commit is contained in:
Rod Kay
2023-04-24 16:34:21 +10:00
parent ac87a2e6ca
commit bd5557cb67
4 changed files with 271 additions and 194 deletions

View File

@@ -47,34 +47,40 @@ is
--- Sprites
--
use gel.Sprite;
-- 2D
--
function new_circle_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
Radius : in math.Real := 0.5;
Color : in openGL.Color := opengl.Palette.White;
Texture : in openGL.asset_Name := openGL.null_Asset) return gel.Sprite.view;
function new_circle_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
Radius : in math.Real := 0.5;
Color : in openGL.Color := opengl.Palette.White;
Texture : in openGL.asset_Name := openGL.null_Asset;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_polygon_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
Vertices : in Geometry_2d.Sites;
Color : in openGL.Color := opengl.Palette.White) return gel.Sprite.view;
function new_polygon_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
Vertices : in Geometry_2d.Sites;
Color : in openGL.Color := opengl.Palette.White;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_rectangle_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
function new_rectangle_Sprite (in_World : in gel.World.view;
Site : in math.Vector_2 := math.Origin_2D;
Mass : in math.Real := 1.0;
Friction : in math.Real := 0.5;
Bounce : in math.Real := 0.5;
Width,
Height : in math.Real;
Color : in openGL.Color := opengl.Palette.White) return gel.Sprite.view;
Height : in math.Real;
Color : in openGL.Color := opengl.Palette.White;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
-- 3D
--
@@ -86,74 +92,84 @@ is
long_Count : in Positive := openGL.Model.sphere.default_longitude_Count;
is_Lit : in Boolean := True;
Color : in openGL.lucid_Color := opengl.no_lucid_Color;
Texture : in openGL.asset_Name := openGL.null_Asset) return gel.Sprite.view;
Texture : in openGL.asset_Name := openGL.null_Asset;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_skysphere_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Radius : in math.Real := 1_000_000.0;
Texture : in openGL.asset_Name) return gel.Sprite.view;
function new_skysphere_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Radius : in math.Real := 1_000_000.0;
Texture : in openGL.asset_Name;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
subtype box_Colors is openGL.Colors (1 .. 6);
function new_box_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Colors : in box_Colors := [others => opengl.Palette.random_Color];
is_Kinematic : in Boolean := False) return gel.Sprite.view;
function new_box_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Colors : in box_Colors := [others => opengl.Palette.random_Color];
is_Kinematic : in Boolean := False;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_box_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name) return gel.Sprite.view;
function new_box_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_billboard_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset) return gel.Sprite.view;
function new_billboard_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_billboard_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Color : in openGL.lucid_Color;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset) return gel.Sprite.view;
function new_billboard_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Color : in openGL.lucid_Color;
Mass : in math.Real := 1.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_arrow_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width) return gel.Sprite.view;
function new_arrow_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_line_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width) return gel.Sprite.view;
function new_line_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
function new_segment_line_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width) return gel.Sprite.view;
function new_segment_line_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Mass : in math.Real := 0.0;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Texture : in openGL.asset_Name := openGL.null_Asset;
Color : in openGL.lucid_Color := (openGL.Palette.Black, openGL.Opaque);
line_Width : in openGL.Real := openGL.Primitive.unused_line_Width;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
-- Text
--
function new_text_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Text : in String;
Font : in openGL.Font.font_Id;
Color : in openGL.Color := opengl.Palette.Black;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Centered : in Boolean := True) return gel.Sprite.view;
function new_text_Sprite (in_World : in gel.World.view;
Site : in math.Vector_3 := math.Origin_3D;
Text : in String;
Font : in openGL.Font.font_Id;
Color : in openGL.Color := opengl.Palette.Black;
Size : in math.Vector_3 := [1.0, 1.0, 1.0];
Centered : in Boolean := True;
user_Data : in any_user_Data_view := null) return gel.Sprite.view;
end gel.Forge;