Download Now

    Reference TDampedSpringJoint

    Declared in Codebot.Physics.pas on line 602

    TDampedSpringJoint connects the anchors of two bodies with a spring
      TDampedSpringJoint = record
      public
        Ref: cpConstraint;
        class operator Implicit(const Value: TDampedSpringJoint): cpConstraint; inline;
        class operator Implicit(const Value: cpConstraint): TDampedSpringJoint; inline;
        { Anchors in body coordinates }
        property PinA: TVec2 read GetPinA write SetPinA;
        property PinB: TVec2 read GetPinB write SetPinB;
        { The length at which the spring rests }
        property RestLength: Float read GetRestLength write SetRestLength;
        { How stiff the spring is }
        property Stiffness: Float read GetStiffness write SetStiffness;
        { How quickly the spring comes to rest }
        property Damping: Float read GetDamping write SetDamping;
        { A callback which replaces the calculation of the spring force }
        property ForceFunc: cpDampedSpringForceFunc read GetForceFunc write SetForceFunc;
      end;

    See also

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