Page 1 of 1

Surface3D

Posted: Mon Sep 27, 2004 7:37 pm
by 8574417
Does anybody have an example of using the Surface3D of the TDraw3D canvas ? I looked through the demos and googled it, but didn't come up with anything.

-regards,

-Torben

Posted: Tue Sep 28, 2004 7:37 am
by Pep
Hi Torben,

from sources :

Code: Select all

Procedure TTeeCanvas3D.Surface3D( Style:TTeeCanvasSurfaceStyle;                                   SameBrush:Boolean;                                   NumXValues,NumZValues:Integer;                                   CalcPoints:TTeeCanvasCalcPoints );
begin
  { not implemented in GDI mode. (Use TeeOpenGL) }
end;
This method is not implemented for TTeeCanvas3D. Instead, you should use TGLCanvas.Surface3D method ( a bit complicated, but it should work), where :

Style = TTeeCanvasSurfaceStyle=(tcsSolid,tcsWire,tcsDot);
CalcPoints = TTeeCanvasCalcPoints=Function( x,z:Integer; Var P0,P1:TPoint3D;
Var Color0,Color1:TColor):Boolean of object;

Posted: Tue Sep 28, 2004 11:55 am
by 8574417
Thanks, I'll have a look :-D

-Torben