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

#include <b2WheelJoint.h>

Inheritance diagram for b2WheelJointDef:
Inheritance graph
[legend]

Public Member Functions

 b2WheelJointDef ()
 
void Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &anchor, const b2Vec2 &axis)
 
- Public Member Functions inherited from b2JointDef
 b2JointDef ()
 

Public Attributes

float32 dampingRatio
 Suspension damping ratio, one indicates critical damping. More...
 
bool enableMotor
 Enable/disable the joint motor. More...
 
float32 frequencyHz
 Suspension frequency, zero indicates no suspension. More...
 
b2Vec2 localAnchorA
 The local anchor point relative to bodyA's origin. More...
 
b2Vec2 localAnchorB
 The local anchor point relative to bodyB's origin. More...
 
b2Vec2 localAxisA
 The local translation axis in bodyA. More...
 
float32 maxMotorTorque
 The maximum motor torque, usually in N-m. More...
 
float32 motorSpeed
 The desired motor speed in radians per second. More...
 
- Public Attributes inherited from b2JointDef
b2BodybodyA
 The first attached body. More...
 
b2BodybodyB
 The second attached body. More...
 
bool collideConnected
 Set this flag to true if the attached bodies should collide. More...
 
b2JointType type
 The joint type is set automatically for concrete joint types. More...
 
voiduserData
 Use this to attach application specific data to your joints. More...
 

Detailed Description

Wheel 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.

Definition at line 30 of file b2WheelJoint.h.

Constructor & Destructor Documentation

b2WheelJointDef::b2WheelJointDef ( )
inline

Definition at line 32 of file b2WheelJoint.h.

Member Function Documentation

void b2WheelJointDef::Initialize ( b2Body bodyA,
b2Body bodyB,
const b2Vec2 anchor,
const b2Vec2 axis 
)

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

Definition at line 39 of file b2WheelJoint.cpp.

Member Data Documentation

float32 b2WheelJointDef::dampingRatio

Suspension damping ratio, one indicates critical damping.

Definition at line 71 of file b2WheelJoint.h.

bool b2WheelJointDef::enableMotor

Enable/disable the joint motor.

Definition at line 59 of file b2WheelJoint.h.

float32 b2WheelJointDef::frequencyHz

Suspension frequency, zero indicates no suspension.

Definition at line 68 of file b2WheelJoint.h.

b2Vec2 b2WheelJointDef::localAnchorA

The local anchor point relative to bodyA's origin.

Definition at line 50 of file b2WheelJoint.h.

b2Vec2 b2WheelJointDef::localAnchorB

The local anchor point relative to bodyB's origin.

Definition at line 53 of file b2WheelJoint.h.

b2Vec2 b2WheelJointDef::localAxisA

The local translation axis in bodyA.

Definition at line 56 of file b2WheelJoint.h.

float32 b2WheelJointDef::maxMotorTorque

The maximum motor torque, usually in N-m.

Definition at line 62 of file b2WheelJoint.h.

float32 b2WheelJointDef::motorSpeed

The desired motor speed in radians per second.

Definition at line 65 of file b2WheelJoint.h.


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


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52