Can anybody explain to me the meaning of parameters in TTeeCanvasCalcPoints function (part of TGLCanvas.Surface3D method)?
Teodor
TTeeCanvasCalcPoints parameters ?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Teodor,
Below you have FastCalcPoints code. Basically, what this method does is calculating a point position in a quicker way considering the previous point position so that the point can be drawn quicker. If this is possible it returns true, otherwise it returns false.
Below you have FastCalcPoints code. Basically, what this method does is calculating a point position in a quicker way considering the previous point position so that the point can be drawn quicker. If this is possible it returns true, otherwise it returns false.
Code: Select all
Function TSurfaceSeries.FastCalcPoints( x,z:Integer;
Var P0,P1:TPoint3D;
Var Color0,Color1:TColor):Boolean;
var tmp0 : TChartValue;
tmp1 : TChartValue;
begin
result:=False;
ValueIndex0:=GridIndex[x-1,z];
if ValueIndex0<>-1 then
begin
ValueIndex1:=GridIndex[x,z];
if ValueIndex1<>-1 then
begin
With GetHorizAxis do
begin
P0.x:=CalcXPosValue(XValues.Value[ValueIndex0]);
P1.x:=CalcXPosValue(XValues.Value[ValueIndex1]);
end;
P0.z:=CalcZPos(ValueIndex0);
P1.z:=CalcZPos(ValueIndex1);
tmp0:=YValues.Value[ValueIndex0];
tmp1:=YValues.Value[ValueIndex1];
With GetVertAxis do
begin
P0.y:=CalcYPosValue(tmp0);
P1.y:=CalcYPosValue(tmp1);
end;
if not FSameBrush then
begin
Color0:=ValueColor[ValueIndex0];
Color1:=ValueColor[ValueIndex1];
end;
result:=True;
end;
end;
end;
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |