Torque2D Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes | List of all members
b2MotorJointDef Struct Reference

Motor joint definition. More...

`#include <b2MotorJoint.h>`

Inheritance diagram for b2MotorJointDef:

## Public Member Functions
| b2MotorJointDef ()
void | Initialize (b2Body *bodyA, b2Body *bodyB)
| Initialize the bodies and offsets using the current transforms. More...
Public Member Functions inherited from b2JointDef
| b2JointDef ()

## Public Attributes
b2Vec2 | linearOffset
| Position of bodyB minus the position of bodyA, in bodyA's frame, in meters. More...
float32 | angularOffset
| The bodyB angle minus bodyA angle in radians. More...
float32 | maxForce
| The maximum motor force in N. More...
float32 | maxTorque
| The maximum motor torque in N-m. More...
float32 | correctionFactor
| Position correction factor in the range [0,1]. More...
Public Attributes inherited from b2JointDef
b2JointType | type
| The joint type is set automatically for concrete joint types. More...
void * | userData
| Use this to attach application specific data to your joints. More...
b2Body * | bodyA
| The first attached body. More...
b2Body * | bodyB
| The second attached body. More...
bool | collideConnected
| Set this flag to true if the attached bodies should collide. More...

## Detailed Description

Motor joint definition.

## Constructor & Destructor Documentation

b2MotorJointDef | ( |  | ) |
| inline

## Member Function Documentation

void Initialize | ( | b2Body * | bodyA,
|  | b2Body * | bodyB
| ) |  |

Initialize the bodies and offsets using the current transforms.

## Member Data Documentation

float32 angularOffset

The bodyB angle minus bodyA angle in radians.

float32 correctionFactor

Position correction factor in the range [0,1].

b2Vec2 linearOffset

Position of bodyB minus the position of bodyA, in bodyA's frame, in meters.

float32 maxForce

The maximum motor force in N.

float32 maxTorque

The maximum motor torque in N-m.

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

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