home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programming
/
powerprogramming1994.iso
/
progtool
/
surfmodl
/
surfm203.arc
/
SURFSRC.ARC
/
MINMAX.INC
< prev
next >
Wrap
Text File
|
1987-01-05
|
784b
|
28 lines
procedure MINMAX (var Surfmin, Surfmax: surfaces; Nsurf: integer);
{ Calculate the minimum and maximum Ztran coordinates of each surface }
var Surf: integer; { surface # }
Vert: integer; { vertex # }
Zval: real; { Z-coord of node }
begin
{$ifdef BIGMEM}
with ptrf^ do with ptrh^ do
begin
{$endif}
for Surf := 1 to Nsurf do begin
Surfmin[Surf] := 9999.0;
Surfmax[Surf] := -9999.0;
for Vert := 1 to Nvert[Surf] do begin
Zval := Ztran[Konnec (Surf, Vert)];
if (Zval < Surfmin[Surf]) then
Surfmin[Surf] := Zval;
if (Zval > Surfmax[Surf]) then
Surfmax[Surf] := Zval;
end;
end;
{$ifdef BIGMEM}
end; {with}
{$endif}
end; { procedure MINMAX }