Download Now

    Reference TSegment

    Declared in Codebot.Physics.pas on line 173

    TSegment is a line segment shape, which can have a thickness
      TSegment = record
      public
        Ref: cpSegmentShape;
        class operator Implicit(const Value: TSegment): cpSegmentShape; inline;
        class operator Implicit(const Value: cpSegmentShape): TSegment; inline;
        class operator Implicit(const Value: TSegment): cpShape; inline;
        class operator Implicit(const Value: cpShape): TSegment; inline;
        { Remove the segment from its space and free it }
        procedure Free;
        { True if this refers to nothing }
        function IsNil: Boolean; inline;
        { Let Chipmunk2D know about the geometry of adjacent segments to avoid
          colliding with endcaps }
        procedure Join(const Prev, Next: TVec2);
        { The radius of the segment }
        property Border: Float read GetBorder write SetBorder;
        { The first end of the segment }
        property A: TVec2 read GetA write SetA;
        { The second end of the segment }
        property B: TVec2 read GetB write SetB;
        { The normal of the segment }
        property Normal: TVec2 read GetNormal;
      end;

    See also

    Float in Codebot.System.pas
    TVec2 in Codebot.Geometry.pas