Box2D  3.0.0
A Real-Time-Oriented 2-D Physics Engine
Public Member Functions | Public Attributes | List of all members
box2d::RopeJointDef Struct Reference

Rope joint definition. This requires two body anchor points and a maximum lengths. Note: by default the connected objects will not collide. see collideConnected in JointDef. More...

#include <RopeJoint.hpp>

Inheritance diagram for box2d::RopeJointDef:
box2d::JointDef

Public Member Functions

constexpr RopeJointDef () noexcept
 
constexpr RopeJointDef (Body *bodyA, Body *bodyB) noexcept
 
- Public Member Functions inherited from box2d::JointDef
 JointDef ()=delete
 Deleted default constructor for abstract base class. More...
 
constexpr JointDef (JointType t) noexcept
 
constexpr JointDef (JointType t, Body *bA, Body *bB, bool cc=false, void *u=nullptr) noexcept
 

Public Attributes

Length2D localAnchorA = Vec2{-1, 0} * Meter
 The local anchor point relative to bodyA's origin. More...
 
Length2D localAnchorB = Vec2{1, 0} * Meter
 The local anchor point relative to bodyB's origin. More...
 
Length maxLength = Length{0}
 The maximum length of the rope. More...
 
- Public Attributes inherited from box2d::JointDef
const JointType type
 The joint type is set automatically for concrete joint types. More...
 
BodybodyA = nullptr
 The first attached body. More...
 
BodybodyB = nullptr
 The second attached body. More...
 
bool collideConnected = false
 Set this flag to true if the attached bodies should collide. More...
 
void * userData = nullptr
 Use this to attach application specific data to your joints. More...
 

Detailed Description

Rope joint definition. This requires two body anchor points and a maximum lengths. Note: by default the connected objects will not collide. see collideConnected in JointDef.

Constructor & Destructor Documentation

◆ RopeJointDef() [1/2]

constexpr box2d::RopeJointDef::RopeJointDef ( )
inlinenoexcept

◆ RopeJointDef() [2/2]

constexpr box2d::RopeJointDef::RopeJointDef ( Body bodyA,
Body bodyB 
)
inlinenoexcept

Member Data Documentation

◆ localAnchorA

Length2D box2d::RopeJointDef::localAnchorA = Vec2{-1, 0} * Meter

The local anchor point relative to bodyA's origin.

◆ localAnchorB

Length2D box2d::RopeJointDef::localAnchorB = Vec2{1, 0} * Meter

The local anchor point relative to bodyB's origin.

◆ maxLength

Length box2d::RopeJointDef::maxLength = Length{0}

The maximum length of the rope.


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