Download Now

    Reference TJoint

    Declared in Codebot.Physics.pas on line 738

    TJoint is a constraint which connects two bodies
      TJoint = record
      public
        Ref: cpConstraint;
        class operator Implicit(const Value: TJoint): cpConstraint; inline;
        class operator Implicit(const Value: cpConstraint): TJoint; inline;
        class operator Equal(const A, B: TJoint): Boolean; inline;
        class operator NotEqual(const A, B: TJoint): Boolean; inline;
        { Remove the joint from its space and free it. If the space is locked, such
          as in a collision callback, this happens after the current step. }
        procedure Free;
        { True if this refers to nothing }
        function IsNil: Boolean; inline;
        { Returns true if either body has a first shape with the grab collision type }
        function IsGrab: Boolean;
        { The joint as one of the kinds of joint }
        function AsPin: TPinJoint; inline;
        function AsSlide: TSlideJoint; inline;
        function AsPivot: TPivotJoint; inline;
        function AsGroove: TGrooveJoint; inline;
        function AsDampedSpring: TDampedSpringJoint; inline;
        function AsDampedRotarySpring: TDampedRotarySpringJoint; inline;
        function AsRotaryLimit: TRotaryLimitJoint; inline;
        function AsRatchet: TRatchetJoint; inline;
        function AsGear: TGearJoint; inline;
        function AsMotor: TMotorJoint; inline;
        { The kind of joint }
        property Kind: TJointKind read GetKind;
        { The first body in the joint }
        property A: TBody read GetA;
        { The second body in the joint }
        property B: TBody read GetB;
        { When collide bodies is set to false A and B will pass through each other }
        property CollideBodies: Boolean read GetCollide write SetCollide;
        { The percentage of joint error which remains unfixed after a second }
        property ErrorBias: Float read GetErrorBias write SetErrorBias;
        { The maximum speed at which the joint can apply error correction }
        property MaxBias: Float read GetMaxBias write SetMaxBias;
        { The maximum force the joint can use to act on the two bodies }
        property MaxForce: Float read GetMaxForce write SetMaxForce;
        { The most recent impulse applied by the joint }
        property Impulse: Float read GetImpulse;
        { Callbacks invoked before and after the joint is solved }
        property PreSolve: cpConstraintPreSolveFunc read GetPreSolve write SetPreSolve;
        { A callback made after the joint has been solved }
        property PostSolve: cpConstraintPostSolveFunc read GetPostSolve write SetPostSolve;
        { A value of your own kept with the joint }
        property UserData: Pointer read GetUserData write SetUserData;
      end;

    See also

    Float in Codebot.System.pas