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

#include <b2_prismatic_joint.h>

Inheritance diagram for b2PrismaticJointDef:
Inheritance graph
[legend]

Public Member Functions

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

Public Attributes

bool enableLimit
 Enable/disable the joint limit. More...
 
bool enableMotor
 Enable/disable the joint motor. 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 unit axis in bodyA. More...
 
float lowerTranslation
 The lower translation limit, usually in meters. More...
 
float maxMotorForce
 The maximum motor torque, usually in N-m. More...
 
float motorSpeed
 The desired motor speed in radians per second. More...
 
float referenceAngle
 The constrained angle between the bodies: bodyB_angle - bodyA_angle. More...
 
float upperTranslation
 The upper translation limit, usually in meters. 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...
 
b2JointUserData userData
 Use this to attach application specific data to your joints. More...
 

Detailed Description

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.

Definition at line 35 of file b2_prismatic_joint.h.

Constructor & Destructor Documentation

◆ b2PrismaticJointDef()

b2PrismaticJointDef::b2PrismaticJointDef ( )
inline

Definition at line 37 of file b2_prismatic_joint.h.

Member Function Documentation

◆ Initialize()

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

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

Definition at line 73 of file b2_prismatic_joint.cpp.

Member Data Documentation

◆ enableLimit

bool b2PrismaticJointDef::enableLimit

Enable/disable the joint limit.

Definition at line 69 of file b2_prismatic_joint.h.

◆ enableMotor

bool b2PrismaticJointDef::enableMotor

Enable/disable the joint motor.

Definition at line 78 of file b2_prismatic_joint.h.

◆ localAnchorA

b2Vec2 b2PrismaticJointDef::localAnchorA

The local anchor point relative to bodyA's origin.

Definition at line 57 of file b2_prismatic_joint.h.

◆ localAnchorB

b2Vec2 b2PrismaticJointDef::localAnchorB

The local anchor point relative to bodyB's origin.

Definition at line 60 of file b2_prismatic_joint.h.

◆ localAxisA

b2Vec2 b2PrismaticJointDef::localAxisA

The local translation unit axis in bodyA.

Definition at line 63 of file b2_prismatic_joint.h.

◆ lowerTranslation

float b2PrismaticJointDef::lowerTranslation

The lower translation limit, usually in meters.

Definition at line 72 of file b2_prismatic_joint.h.

◆ maxMotorForce

float b2PrismaticJointDef::maxMotorForce

The maximum motor torque, usually in N-m.

Definition at line 81 of file b2_prismatic_joint.h.

◆ motorSpeed

float b2PrismaticJointDef::motorSpeed

The desired motor speed in radians per second.

Definition at line 84 of file b2_prismatic_joint.h.

◆ referenceAngle

float b2PrismaticJointDef::referenceAngle

The constrained angle between the bodies: bodyB_angle - bodyA_angle.

Definition at line 66 of file b2_prismatic_joint.h.

◆ upperTranslation

float b2PrismaticJointDef::upperTranslation

The upper translation limit, usually in meters.

Definition at line 75 of file b2_prismatic_joint.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22