|
MNHiddenLines
Windows library
|
The MNHiddenLines library is a high performance and high quality library to produce professional 3D output on base of hidden lines calculation.
- Windows 95/98/ME/NT40/2000
DLL library
- Borland Delphi component
- Import units for Delphi/C/VisualBasic and sample projects in source
Previews:

Source handling:
First
create a hidden line handle:
procedure TForm1.FormCreate(Sender: TObject);
begin
HiddenBuffer:=_HOpen (NormalProjection, NormalDistance, MyLineto, MyMoveto);
end;
Add contours
and holes to the hidden line handle:
...
_HKontur (HiddenBuffer,
[ XYZ(0.00,0.00,0.00),
XYZ(0.00,2.00,0.00),
XYZ(2.00,2.00,0.00),
XYZ(2.00,0.00,0.00),
XYZ(0.00,0.00,0.00) ]);
_HHole (HiddenBuffer,
[XYZ (0.67,0.67,0.00),
XYZ (1.33,0.67,0.00),
XYZ (1.33,1.33,0.00),
XYZ (0.67,1.33,0.00),
XYZ (0.67,0.67,0.00) ]);
...
Paint data from
hidden line handle:
procedure
TForm1.FormPaint(Sender: TObject);
begin
_Hdraw(HiddenBuffer);
end;
Define your
own draw mechanisms:
Procedure MyMoveto (H:THHandle; P:TXY);
var xi,yi:integer;
BEGIN
With Form1.Canvas do BEGIN
Xi:=round(P.x*unitspercm +Form1.width div 2);
Yi:=round(-P.y*unitspercm+Form1.height div 2);
MoveTo(xi,yi);
END;
END;
procedure MyLineto(H:THHandle; Down: Boolean; P:Txy);
var Xi,Yi:integer;
begin
With Form1.canvas do BEGIN
Xi:=round(P.x*unitspercm +Form1.width div 2);
Yi:=round(-P.y*unitspercm+Form1.height div 2);
If Not Down then Pen.style:=Psdot ELSE Pen.style:=PsSolid;
Lineto(xi,yi);
END;
end;
At the end
destroy the hidden line handle:
procedure
TForm1.FormDestroy(Sender: TObject);
begin
_HFree (HiddenBuffer);
end;
it's so easy to fall in love ...