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

#include <b2_pulley_joint.h>

Inheritance diagram for b2PulleyJointDef:
Inheritance graph
[legend]

Public Member Functions

 b2PulleyJointDef ()
 
void Initialize (b2Body *bodyA, b2Body *bodyB, const b2Vec2 &groundAnchorA, const b2Vec2 &groundAnchorB, const b2Vec2 &anchorA, const b2Vec2 &anchorB, float ratio)
 Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. More...
 
- Public Member Functions inherited from b2JointDef
 b2JointDef ()
 

Public Attributes

b2Vec2 groundAnchorA
 The first ground anchor in world coordinates. This point never moves. More...
 
b2Vec2 groundAnchorB
 The second ground anchor in world coordinates. This point never moves. More...
 
float lengthA
 The a reference length for the segment attached to bodyA. More...
 
float lengthB
 The a reference length for the segment attached to bodyB. 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...
 
float ratio
 The pulley ratio, used to simulate a block-and-tackle. 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

Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.

Definition at line 33 of file b2_pulley_joint.h.

Constructor & Destructor Documentation

◆ b2PulleyJointDef()

b2PulleyJointDef::b2PulleyJointDef ( )
inline

Definition at line 35 of file b2_pulley_joint.h.

Member Function Documentation

◆ Initialize()

void b2PulleyJointDef::Initialize ( b2Body bodyA,
b2Body bodyB,
const b2Vec2 groundAnchorA,
const b2Vec2 groundAnchorB,
const b2Vec2 anchorA,
const b2Vec2 anchorB,
float  ratio 
)

Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors.

Definition at line 39 of file b2_pulley_joint.cpp.

Member Data Documentation

◆ groundAnchorA

b2Vec2 b2PulleyJointDef::groundAnchorA

The first ground anchor in world coordinates. This point never moves.

Definition at line 55 of file b2_pulley_joint.h.

◆ groundAnchorB

b2Vec2 b2PulleyJointDef::groundAnchorB

The second ground anchor in world coordinates. This point never moves.

Definition at line 58 of file b2_pulley_joint.h.

◆ lengthA

float b2PulleyJointDef::lengthA

The a reference length for the segment attached to bodyA.

Definition at line 67 of file b2_pulley_joint.h.

◆ lengthB

float b2PulleyJointDef::lengthB

The a reference length for the segment attached to bodyB.

Definition at line 70 of file b2_pulley_joint.h.

◆ localAnchorA

b2Vec2 b2PulleyJointDef::localAnchorA

The local anchor point relative to bodyA's origin.

Definition at line 61 of file b2_pulley_joint.h.

◆ localAnchorB

b2Vec2 b2PulleyJointDef::localAnchorB

The local anchor point relative to bodyB's origin.

Definition at line 64 of file b2_pulley_joint.h.

◆ ratio

float b2PulleyJointDef::ratio

The pulley ratio, used to simulate a block-and-tackle.

Definition at line 73 of file b2_pulley_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