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

Friction joint definition. More...

#include <FrictionJoint.hpp>

Inheritance diagram for box2d::FrictionJointDef:
box2d::JointDef

Public Member Functions

constexpr FrictionJointDef () noexcept
 
void Initialize (Body *bodyA, Body *bodyB, const Length2D anchor)
 Initialize the bodies, anchors, axis, and reference angle using the world anchor and world axis. More...
 
- 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_zero * Meter
 The local anchor point relative to bodyA's origin. More...
 
Length2D localAnchorB = Vec2_zero * Meter
 The local anchor point relative to bodyB's origin. More...
 
Force maxForce = Force{0}
 The maximum friction force in N. More...
 
Torque maxTorque = Torque{0}
 The maximum friction torque in N-m. 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

Friction joint definition.

Constructor & Destructor Documentation

◆ FrictionJointDef()

constexpr box2d::FrictionJointDef::FrictionJointDef ( )
inlinenoexcept

Member Function Documentation

◆ Initialize()

void FrictionJointDef::Initialize ( Body bodyA,
Body bodyB,
const Length2D  anchor 
)

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

Member Data Documentation

◆ localAnchorA

Length2D box2d::FrictionJointDef::localAnchorA = Vec2_zero * Meter

The local anchor point relative to bodyA's origin.

◆ localAnchorB

Length2D box2d::FrictionJointDef::localAnchorB = Vec2_zero * Meter

The local anchor point relative to bodyB's origin.

◆ maxForce

Force box2d::FrictionJointDef::maxForce = Force{0}

The maximum friction force in N.

◆ maxTorque

Torque box2d::FrictionJointDef::maxTorque = Torque{0}

The maximum friction torque in N-m.


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