Changeset 248 for trunk/UGeometry.pas


Ignore:
Timestamp:
Sep 22, 2018, 2:35:46 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Drawing Voronoi type map in cyclic mode.
  • Fixed: Clear player cells before map cells regeneration.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGeometry.pas

    r236 r248  
    9898    constructor Create(const Points: TPointArray); overload;
    9999    constructor Create(const Rect: TGRect<T>); overload;
     100    procedure Move(P: T);
    100101    function GetRect: TGRect<T>;
    101102    function EdgeDistance(Polygon: TGPolygon<T>): Double;
     
    331332end;
    332333
     334procedure TGPolygon<T>.Move(P: T);
     335var
     336  I: Integer;
     337begin
     338  for I := 0 to Length(Points) - 1 do
     339    Points[I] := Points[I] + P;
     340end;
     341
    333342{ TGLine }
    334343
Note: See TracChangeset for help on using the changeset viewer.