Skip to content

Commit

Permalink
Export TPointArray.FurthestPoints
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Sep 21, 2023
1 parent 65dadff commit d3c5104
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Source/script/imports/simba/simba.import_tpa.pas
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ procedure _LapeTPAIsPointNearby2(const Params: PParamArray; const Result: Pointe
PBoolean(Result)^ := PPointArray(Params^[0])^.IsPointNearby(PPoint(Params^[1])^, PDouble(Params^[2])^, PDouble(Params^[3])^, PDouble(Params^[4])^, PDouble(Params^[5])^);
end;

(*
TPointArray.FurthestPoints
~~~~~~~~~~~~~~~~~~~~~~~~~~
> procedure TPointArray.FurthestPoints(out A, B: TPoint);
*)
procedure _LapeTPAFurthestPoints(const Params: PParamArray); LAPE_WRAPPER_CALLING_CONV
begin
PPointArray(Params^[0])^.FurthestPoints(PPoint(Params^[1])^, PPoint(Params^[2])^);
end;

(*
TPointArray.NearestPoint
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -797,6 +807,7 @@ procedure ImportTPA(Compiler: TSimbaScript_Compiler);
addGlobalFunc('function TPointArray.IsPointNearby(Other: TPoint; MinDist, MaxDist: Double): Boolean; overload', @_LapeTPAIsPointNearby1);
addGlobalFunc('function TPointArray.IsPointNearby(Other: TPoint; MinDistX, MinDistY, MaxDistX, MaxDistY: Double): Boolean; overload', @_LapeTPAIsPointNearby2);

addGlobalFunc('procedure TPointArray.FurthestPoints(out A, B: TPoint)', @_LapeTPAFurthestPoints);
addGlobalFunc('function TPointArray.NearestPoint(Other: TPoint): TPoint', @_LapeTPANearestPoint);

addGlobalFunc('function TPointArray.Unique: TPointArray; override', @_LapeTPAUnique);
Expand Down

0 comments on commit d3c5104

Please sign in to comment.