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

Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work). More...

#include <GearJoint.hpp>

Inheritance diagram for box2d::GearJointDef:
box2d::JointDef

Public Member Functions

constexpr GearJointDef () 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

Jointjoint1 = nullptr
 The first revolute/prismatic joint attached to the gear joint. More...
 
Jointjoint2 = nullptr
 The second revolute/prismatic joint attached to the gear joint. More...
 
RealNum ratio = RealNum{1}
 The gear ratio. 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

Gear joint definition. This definition requires two existing revolute or prismatic joints (any combination will work).

Constructor & Destructor Documentation

◆ GearJointDef()

constexpr box2d::GearJointDef::GearJointDef ( )
inlinenoexcept

Member Data Documentation

◆ joint1

Joint* box2d::GearJointDef::joint1 = nullptr

The first revolute/prismatic joint attached to the gear joint.

◆ joint2

Joint* box2d::GearJointDef::joint2 = nullptr

The second revolute/prismatic joint attached to the gear joint.

◆ ratio

RealNum box2d::GearJointDef::ratio = RealNum{1}

The gear ratio.

See also
GearJoint for explanation.

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