Add initial prototype.
This commit is contained in:
30
3-mid/opengl/source/lean/model/opengl-model-sphere.adb
Normal file
30
3-mid/opengl/source/lean/model/opengl-model-sphere.adb
Normal file
@@ -0,0 +1,30 @@
|
||||
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;
|
||||
Reference in New Issue
Block a user