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

Abstract base Joint Definition class. More...

#include <Joint.hpp>

Inheritance diagram for box2d::JointDef:
box2d::DistanceJointDef box2d::FrictionJointDef box2d::GearJointDef box2d::MotorJointDef box2d::MouseJointDef box2d::PrismaticJointDef box2d::PulleyJointDef box2d::RevoluteJointDef box2d::RopeJointDef box2d::WeldJointDef box2d::WheelJointDef

Public Member Functions

 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

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

Abstract base Joint Definition class.

Joint definitions are used to construct joints.

Note
This class is not meant to be directly instantiated; it is meant to be inherreted from.

Constructor & Destructor Documentation

◆ JointDef() [1/3]

box2d::JointDef::JointDef ( )
delete

Deleted default constructor for abstract base class.

◆ JointDef() [2/3]

constexpr box2d::JointDef::JointDef ( JointType  t)
inlinenoexcept

◆ JointDef() [3/3]

constexpr box2d::JointDef::JointDef ( JointType  t,
Body bA,
Body bB,
bool  cc = false,
void *  u = nullptr 
)
inlinenoexcept

Member Data Documentation

◆ bodyA

Body* box2d::JointDef::bodyA = nullptr

The first attached body.

◆ bodyB

Body* box2d::JointDef::bodyB = nullptr

The second attached body.

◆ collideConnected

bool box2d::JointDef::collideConnected = false

Set this flag to true if the attached bodies should collide.

◆ type

const JointType box2d::JointDef::type

The joint type is set automatically for concrete joint types.

◆ userData

void* box2d::JointDef::userData = nullptr

Use this to attach application specific data to your joints.


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