mirror of
https://git.sr.ht/~rabbits/macintosh_cookbook
synced 2024-11-23 18:31:25 +00:00
Added plane with intersections
This commit is contained in:
parent
de90f4e649
commit
6824fd50ee
@ -8,7 +8,9 @@ interface
|
||||
procedure SetDoorway3D (var shape: Shape3D; x, y, z, w, h, d: Fixed);
|
||||
procedure SetDoorwayWall3D (var shape: Shape3D; x, y, z, w, h, d: Fixed);
|
||||
procedure SetLedge3D (var shape: Shape3D; x, y, z, w, h, d: Fixed);
|
||||
|
||||
procedure SetParticles3D (var shape: Shape3D; x, y, z, w, h, d: Fixed);
|
||||
procedure SetGrd3D (var shape: Shape3D; x, y, z, w, h, d: Longint);
|
||||
|
||||
implementation
|
||||
|
||||
@ -103,4 +105,20 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SetGrd3D (var shape: Shape3D; x, y, z, w, h, d: Longint);
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
for i := 1 to d do
|
||||
begin
|
||||
AddVertice3D(shape, x - w div 2, y + h div 2 - h div d * (i - 1), z);
|
||||
AddVertice3D(shape, x + w div 2, y + h div 2 - h div d * (i - 1), z);
|
||||
AddEdge3D(shape, i * 4 - 3, i * 4 - 2);
|
||||
AddVertice3D(shape, x + w div 2 - w div d * (i - 1), y - h div 2, z);
|
||||
AddVertice3D(shape, x + w div 2 - w div d * (i - 1), y + h div 2, z);
|
||||
AddEdge3D(shape, i * 4 - 1, i * 4);
|
||||
end;
|
||||
AddRec3D(shape, x, y, z, w, h div 4 * 4);
|
||||
end;
|
||||
|
||||
end.
|
@ -297,7 +297,7 @@ implementation
|
||||
viewWidth := 640;
|
||||
viewHeight := 405;
|
||||
padLeft := 15;
|
||||
padTop := 20;
|
||||
padTop := 40;
|
||||
SetRect(drawingRect, padLeft, padTop, padLeft + viewWidth, padTop + viewHeight);
|
||||
SetDrawingRect(drawingRect);
|
||||
ShowDrawing;
|
||||
|
Loading…
Reference in New Issue
Block a user