C# (CSharp) Box2D.Dynamics.Joints Namespace

Classes

Name Description
ConstantVolumeJoint
ConstantVolumeJointDef Definition for a {@link ConstantVolumeJoint}, which connects a group a bodies together so they maintain a constant volume within them.
DistanceJoint A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
DistanceJointDef Distance joint definition. This requires defining an anchor point on both bodies and the non-zero length of the distance joint. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. This helps when saving and loading a game.
FrictionJoint
FrictionJointDef Friction joint definition.
GearJointDef Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). The provided joints must attach a dynamic body to a static body.
Jacobian
Joint The base joint class. Joints are used to raint two bodies together in various fashions. Some joints also feature limits and motors.
JointDef Joint definitions are used to construct joints.
JointEdge A joint edge is used to connect bodies and joints together in a joint graph where each body is a node and each joint is an edge. A joint edge belongs to a doubly linked list maintained in each attached body. Each joint has two joint nodes, one for each attached body.
LineJointDef
MouseJoint A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.
MouseJointDef Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
PrismaticJoint A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
PrismaticJointDef Prismatic joint definition. This requires defining a line of motion using an axis and an anchor point. The definition uses local anchor points and a local axis so that the initial configuration can violate the constraint slightly. The joint translation is zero when the local anchor points coincide in world space. Using local anchors and a local axis helps when saving and loading a game.
PulleyJoint The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.
PulleyJointDef Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
RevoluteJoint A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
RevoluteJointDef Revolute joint definition. This requires defining an anchor point where the bodies are joined. The definition uses local anchor points so that the initial configuration can violate the constraint slightly. You also need to specify the initial relative angle for joint limits. This helps when saving and loading a game. The local anchor points are measured from the body's origin rather than the center of mass because:
  • you might not know where the center of mass will be.
  • if you add/remove shapes from a body and recompute the mass, the joints will be broken.
WeldJoint A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
WeldJointDef