WT-Fakawi
2012-09-15 04:58:49
As you know, i have away for some time. but lately got some spare to kill. Been reading through a lot of the forums, started scripting, and most of the old scripts still work. So that is good!
But, in trying to make a proper DDTM around Draynor Centre, I came across a very weird coord situation with FindDtmRotated .
This has been there (for me at least) for some time. but now I took some time to properly investigate.
This is the situation: I made a DDTM from the Plant (which is a unique color combi on the MM). Mainpoint is centre of MM, and the four point represent the outer edges:

The PlantColor coords make sense, the Distance to DDTM makes sense, only the values returned from FindDtmRotated are puzzling. The make only sense if you interprete them as up-side-down. Below is the readout:
I have attached my testscript. Stand at Dranyor Centre and run it. Can anyone explain to me what I am doing wrong in finding the correct x and y readout for FindDtmRotated?
Thanks!
But, in trying to make a proper DDTM around Draynor Centre, I came across a very weird coord situation with FindDtmRotated .
This has been there (for me at least) for some time. but now I took some time to properly investigate.
This is the situation: I made a DDTM from the Plant (which is a unique color combi on the MM). Mainpoint is centre of MM, and the four point represent the outer edges:

Procedure AssemblePlantDTM;
var
DTMSubPoints: array[0..3] of TDTMPointDef;
DTMMainPoint: TDTMPointDef;
TempTDTM: TDTM;
begin
Writeln('Assembling plant...');
DTMMainPoint.x:=MMCx;
DTMMainPoint.y:=MMCy;
DTMMainPoint.areasize:=1;
DTMMainPoint.areashape:=0;
DTMMainPoint.color:=16777215;
DTMMainPoint.tolerance:=255;
DTMSubPoints[0].x:=593;
DTMSubPoints[0].y:=109;
DTMSubPoints[0].areasize:=1;
DTMSubPoints[0].areashape:=0;
DTMSubPoints[0].color:=PlantColor;
DTMSubPoints[0].tolerance:=0;
DTMSubPoints[1].x:=593;
DTMSubPoints[1].y:=106;
DTMSubPoints[1].areasize:=1;
DTMSubPoints[1].areashape:=0;
DTMSubPoints[1].color:=PlantColor;
DTMSubPoints[1].tolerance:=0;
DTMSubPoints[2].x:=599;
DTMSubPoints[2].y:=104;
DTMSubPoints[2].areasize:=1;
DTMSubPoints[2].areashape:=0;
DTMSubPoints[2].color:=PlantColor;
DTMSubPoints[2].tolerance:=0;
DTMSubPoints[3].x:=600;
DTMSubPoints[3].y:=107;
DTMSubPoints[3].areasize:=1;
DTMSubPoints[3].areashape:=0;
DTMSubPoints[3].color:=PlantColor;
DTMSubPoints[3].tolerance:=0;
TempTDTM.MainPoint := DTMMainPoint;
TempTDTM.SubPoints := DTMSubPoints;
PlantDTM := AddDTM(TempTDTM);
Writeln('Assembling plant... Done.');
end;
The PlantColor coords make sense, the Distance to DDTM makes sense, only the values returned from FindDtmRotated are puzzling. The make only sense if you interprete them as up-side-down. Below is the readout:
PlantColor = (593, 100)
Dis2DDTM = 2
Pos2DDTM = (627, 83)
I have attached my testscript. Stand at Dranyor Centre and run it. Can anyone explain to me what I am doing wrong in finding the correct x and y readout for FindDtmRotated?
Thanks!



