~rabbits/macintosh-cookbook

6824fd50ee1338ef52ff250367b4a81e0e80f830 — neauoire 4 years ago de90f4e master
Added plane with intersections
2 files changed, 19 insertions(+), 1 deletions(-)

M projects/Neauismetica/Graf3DStructures.pas
M units/Graf3DScene/Graf3DScene.pas
M projects/Neauismetica/Graf3DStructures.pas => projects/Neauismetica/Graf3DStructures.pas +18 -0
@@ 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.
\ No newline at end of file

M units/Graf3DScene/Graf3DScene.pas => units/Graf3DScene/Graf3DScene.pas +1 -1
@@ 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;