jetlag2d
    Preparing search index...

    Interface b2JointAbstract

    The base joint class. Joints are used to constraint two bodies together in various fashions. Some joints also feature limits and motors.

    interface b2Joint {
        m_bodyA: b2Body;
        m_bodyB: b2Body;
        m_collideConnected: boolean;
        m_edgeA: b2JointEdge;
        m_edgeB: b2JointEdge;
        m_islandFlag: boolean;
        m_next: b2Joint | null;
        m_prev: b2Joint | null;
        m_type: b2JointType;
        m_userData: b2JointUserData;
        Draw(draw: b2Draw): void;
        GetAnchorA<T extends XY>(out: T): T;
        GetAnchorB<T extends XY>(out: T): T;
        GetBodyA(): b2Body;
        GetBodyB(): b2Body;
        GetCollideConnected(): boolean;
        GetNext(): b2Joint | null;
        GetReactionForce<T extends XY>(inv_dt: number, out: T): T;
        GetReactionTorque(inv_dt: number): number;
        GetType(): b2JointType;
        GetUserData(): b2JointUserData;
        InitVelocityConstraints(data: b2SolverData): void;
        IsEnabled(): boolean;
        SetUserData(data: b2JointUserData): void;
        ShiftOrigin(_newOrigin: XY): void;
        SolvePositionConstraints(data: b2SolverData): boolean;
        SolveVelocityConstraints(data: b2SolverData): void;
    }

    Hierarchy (View Summary)

    Index
    m_bodyA: b2Body
    m_bodyB: b2Body
    m_collideConnected: boolean
    m_edgeA: b2JointEdge
    m_edgeB: b2JointEdge
    m_islandFlag: boolean
    m_next: b2Joint | null
    m_prev: b2Joint | null
    m_type: b2JointType
    m_userData: b2JointUserData
    • Debug draw this joint

      Parameters

      • draw: b2Draw

      Returns void

    • Get the anchor point on bodyA in world coordinates.

      Type Parameters

      • T extends XY

      Parameters

      • out: T

      Returns T

    • Get the anchor point on bodyB in world coordinates.

      Type Parameters

      • T extends XY

      Parameters

      • out: T

      Returns T

    • Get the first body attached to this joint.

      Returns b2Body

    • Get the second body attached to this joint.

      Returns b2Body

    • Get collide connected. Note: modifying the collide connect flag won't work correctly because the flag is only checked when fixture AABBs begin to overlap.

      Returns boolean

    • Get the next joint the world joint list.

      Returns b2Joint | null

    • Get the reaction force on bodyB at the joint anchor in Newtons.

      Type Parameters

      • T extends XY

      Parameters

      • inv_dt: number
      • out: T

      Returns T

    • Get the reaction torque on bodyB in N*m.

      Parameters

      • inv_dt: number

      Returns number

    • Get the type of the concrete joint.

      Returns b2JointType

    • Get the user data reference.

      Returns b2JointUserData

    • Parameters

      • data: b2SolverData

      Returns void

    • Short-cut function to determine if either body is enabled.

      Returns boolean

    • Set the user data. Use this to store your application specific data. This is a merge operation. Only specified keys will be overridden.

      Parameters

      • data: b2JointUserData

      Returns void

    • Shift the origin for any points stored in world coordinates.

      Parameters

      • _newOrigin: XY

      Returns void

    • This returns true if the position errors are within tolerance.

      Parameters

      • data: b2SolverData

      Returns boolean

    • Parameters

      • data: b2SolverData

      Returns void