Files
lace/3-mid/opengl/source/lean/model/opengl-model-hexagon_column-lit_textured_faceted.ads
2025-09-21 10:54:00 +10:00

62 lines
1.5 KiB
Ada

with
openGL.Geometry,
openGL.Texture,
openGL.Model.texturing;
package openGL.Model.hexagon_Column.lit_textured_faceted
--
-- Models a lit, colored and textured column with 6 faceted shaft sides.
--
is
package textured_Model is new texturing.Mixin (Model.hexagon_Column.item);
type Item is new textured_Model.textured_Item with private;
type View is access all Item'Class;
---------
--- Faces
--
type hex_Face is
record
Texture : asset_Name := openGL.null_Asset; -- The texture to be applied to the face.
end record;
type shaft_Face is
record
Texture : asset_Name := null_Asset; -- The texture to be applied to the shaft.
end record;
---------
--- Forge
--
function new_hexagon_Column (Radius : in Real;
Height : in Real;
Upper,
Lower : in hex_Face;
Shaft : in shaft_Face) return View;
--------------
--- Attributes
--
overriding
function to_GL_Geometries (Self : access Item; Textures : access Texture.name_Map_of_texture'Class;
Fonts : in Font.font_id_Map_of_font) return Geometry.views;
private
type Item is new textured_Model.textured_Item with
record
upper_Face,
lower_Face : hex_Face;
Shaft : shaft_Face;
end record;
end openGL.Model.hexagon_Column.lit_textured_faceted;