322 {-1, -1, 0}, {-1, -1, 0}, {0.0f, 0.0f}, {0.0f, 0.0f}, 0.0f, 0.0f, 0.0f, 1.0f, 1.0f,
false,
#define b2_huge
Definition constants.h:77
Body identitifier.
Definition id.h:23
Definition joint_types.h:13
float length
The rest length of this joint. Clamped to a stable minimum value.
Definition joint_types.h:27
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition joint_types.h:21
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition joint_types.h:42
float dampingRatio
The linear damping ratio (non-dimensional)
Definition joint_types.h:39
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition joint_types.h:24
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:18
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:15
float minLength
Minimum length. Clamped to a stable minimum value.
Definition joint_types.h:30
float maxLength
Maximum length. Must be greater than or equal to the minimum length.
Definition joint_types.h:33
float hertz
The linear stiffness hertz (cycles per second)
Definition joint_types.h:36
Definition joint_types.h:67
float maxForce
The maximum motor force in N.
Definition joint_types.h:81
float correctionFactor
Position correction factor in the range [0,1].
Definition joint_types.h:87
b2Vec2 linearOffset
Position of bodyB minus the position of bodyA, in bodyA's frame, in meters.
Definition joint_types.h:75
float angularOffset
The bodyB angle minus bodyA angle in radians.
Definition joint_types.h:78
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:72
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:69
float maxTorque
The maximum motor torque in N-m.
Definition joint_types.h:84
Definition joint_types.h:109
float damping
The linear damping in N*s/m.
Definition joint_types.h:128
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:114
float maxForce
Definition joint_types.h:122
b2Vec2 target
The initial target point in world space.
Definition joint_types.h:117
float stiffness
The linear stiffness in N/m.
Definition joint_types.h:125
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:111
Definition joint_types.h:150
float lowerTranslation
The lower translation limit, usually in meters.
Definition joint_types.h:173
bool enableMotor
Enable/disable the joint motor.
Definition joint_types.h:179
float motorSpeed
The desired motor speed in radians per second.
Definition joint_types.h:185
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition joint_types.h:161
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:152
float upperTranslation
The upper translation limit, usually in meters.
Definition joint_types.h:176
bool enableLimit
Enable/disable the joint limit.
Definition joint_types.h:170
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition joint_types.h:158
float referenceAngle
The constrained angle between the bodies: bodyB_angle - bodyA_angle.
Definition joint_types.h:167
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:155
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition joint_types.h:188
b2Vec2 localAxisA
The local translation unit axis in bodyA.
Definition joint_types.h:164
float maxMotorForce
The maximum motor force, usually in N.
Definition joint_types.h:182
Definition joint_types.h:222
float lowerAngle
The lower angle for the joint limit (radians).
Definition joint_types.h:243
bool enableLimit
A flag to enable joint limits.
Definition joint_types.h:240
float motorSpeed
The desired motor speed. Usually in radians per second.
Definition joint_types.h:252
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition joint_types.h:233
float upperAngle
The upper angle for the joint limit (radians).
Definition joint_types.h:246
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition joint_types.h:230
float referenceAngle
Definition joint_types.h:237
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition joint_types.h:262
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:224
bool enableMotor
A flag to enable the joint motor.
Definition joint_types.h:249
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:227
float maxMotorTorque
Definition joint_types.h:256
float drawSize
Scale the debug draw.
Definition joint_types.h:259
Definition joint_types.h:289
float linearHertz
Linear stiffness expressed as hertz (oscillations per second). Use zero for maximum stiffness.
Definition joint_types.h:306
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition joint_types.h:297
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:294
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition joint_types.h:300
float referenceAngle
The bodyB angle minus bodyA angle in the reference state (radians).
Definition joint_types.h:303
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:291
float angularHertz
Angular stiffness as hertz (oscillations per second). Use zero for maximum stiffness.
Definition joint_types.h:309
float angularDampingRatio
Linear damping ratio, non-dimensional. Use 1 for critical damping.
Definition joint_types.h:315
float linearDampingRatio
Linear damping ratio, non-dimensional. Use 1 for critical damping.
Definition joint_types.h:312
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition joint_types.h:318
Definition joint_types.h:349
float motorSpeed
The desired motor speed in radians per second.
Definition joint_types.h:381
bool enableLimit
Enable/disable the joint limit.
Definition joint_types.h:366
float stiffness
The linear stiffness in N/m.
Definition joint_types.h:384
float upperTranslation
The upper translation limit, usually in meters.
Definition joint_types.h:372
float lowerTranslation
The lower translation limit, usually in meters.
Definition joint_types.h:369
bool collideConnected
Set this flag to true if the attached bodies should collide.
Definition joint_types.h:390
b2Vec2 localAnchorB
The local anchor point relative to bodyB's origin.
Definition joint_types.h:360
b2BodyId bodyIdB
The second attached body.
Definition joint_types.h:354
bool enableMotor
Enable/disable the joint motor.
Definition joint_types.h:375
b2Vec2 localAnchorA
The local anchor point relative to bodyA's origin.
Definition joint_types.h:357
b2BodyId bodyIdA
The first attached body.
Definition joint_types.h:351
float damping
The linear damping in N*s/m.
Definition joint_types.h:387
float maxMotorTorque
The maximum motor torque, usually in N-m.
Definition joint_types.h:378
b2Vec2 localAxisA
The local translation unit axis in bodyA.
Definition joint_types.h:363
types used by the Box2D API
#define B2_LITERAL(T)
Used for C literals like (b2Vec2){1.0f, 2.0f} where C++ requires b2Vec2{1.0f, 2.0f}.
Definition types.h:29
#define B2_ZERO_INIT
Used for C zero initialization, such as b2Vec2 v = {0} where C++ requires b2Vec2 v = {}.
Definition types.h:32