Files
lace/3-mid/opengl/source/lean/model/opengl-model-sphere.adb
2022-07-31 17:34:54 +10:00

31 lines
547 B
Ada

package body openGL.Model.sphere
is
---------
--- Forge
--
procedure define (Self : out Item; Radius : Real)
is
begin
Self.Radius := Radius;
end define;
--------------
--- Attributes
--
overriding
function Bounds (Self : in Item) return openGL.Bounds
is
begin
return (Ball => Self.Radius,
Box => (Lower => [-Self.Radius, -Self.Radius, -Self.Radius],
Upper => [ Self.Radius, Self.Radius, Self.Radius]));
end Bounds;
end openGL.Model.sphere;