Download Now

    Reference TBezier2

    Declared in Codebot.Geometry.pas on line 443

    TBezier2 represents a 2d cubic bezier curve Remarks Points 0 and 3 are the end points while points 1 and 2 are the control points
      TBezier2 = record
      public
        { Create a bezier curve given end and control points }
        class function Create(const P0, P1, P2, P3: TVec2): TBezier2; overload; static;
        { Flatten into a 2d approximation of the curve with count points Remarks If
          count < 2 flatten will pick an optimal count based on the curve distance }
        function Flatten(Count: Integer = 0): TCurve2;
        P0: TVec2;
        P1: TVec2;
        P2: TVec2;
        P3: TVec2;
        P: array[0..3] of TVec2;
      end;

    See also