# b2WeldJointDef Struct Reference

`#include <b2WeldJoint.h>`

Inheritance diagram for b2WeldJointDef:

List of all members.

## Public Member Functions
| b2WeldJointDef ()
void | Initialize (b2Body *body1, b2Body *body2, const b2Vec2 &anchor)
## Public Attributes
b2Vec2 | localAnchorA
| The local anchor point relative to body1's origin.
b2Vec2 | localAnchorB
| The local anchor point relative to body2's origin.
float32 | referenceAngle
| The body2 angle minus body1 angle in the reference state (radians).

## Detailed Description

Weld joint definition. You need to specify local anchor points where they are attached and the relative body angle. The position of the anchor points is important for computing the reaction torque.

## Constructor & Destructor Documentation

b2WeldJointDef::b2WeldJointDef | ( |  | ) | `[inline]`

## Member Function Documentation

void b2WeldJointDef::Initialize | ( | b2Body * | body1,
|  | b2Body * | body2,
|  | const b2Vec2 & | anchor |
| ) |  |  |

Initialize the bodies, anchors, and reference angle using a world anchor point.

## Member Data Documentation

b2Vec2 b2WeldJointDef::localAnchorA

The local anchor point relative to body1's origin.

b2Vec2 b2WeldJointDef::localAnchorB

The local anchor point relative to body2's origin.

float32 b2WeldJointDef::referenceAngle

The body2 angle minus body1 angle in the reference state (radians).

The documentation for this struct was generated from the following files:

- Box2D/Box2D/Dynamics/Joints/b2WeldJoint.h
- Box2D/Box2D/Dynamics/Joints/b2WeldJoint.cpp