HughPH.Box2D
Organised dotnet bindings for Box2D 3.1.0
Loading...
Searching...
No Matches
Public Member Functions | Properties | List of all members
Box2D.WeldJointDef Class Referencesealed

Weld joint definition
More...

Public Member Functions

 WeldJointDef (Body bodyA, Body bodyB, Vec2 anchorA, Vec2 anchorB, float referenceAngle=0.0f, float linearHertz=0.0f, float angularHertz=0.0f, float linearDampingRatio=0.0f, float angularDampingRatio=0.0f, bool collideConnected=false, object? userData=null)
 Construct a weld joint definition with the supplied values.
 
 WeldJointDef ()
 Construct a weld joint definition with the default values.
 

Properties

ref Body BodyA [get]
 The first attached body.
 
ref Body BodyB [get]
 The second attached body.
 
ref Vec2 LocalAnchorA [get]
 The local anchor point relative to bodyA's origin.
 
ref Vec2 LocalAnchorB [get]
 The local anchor point relative to bodyB's origin.
 
ref float ReferenceAngle [get]
 The bodyB angle minus bodyA angle in the reference state (radians)
 
ref float LinearHertz [get]
 Linear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness.
 
ref float AngularHertz [get]
 Angular stiffness as Hertz (cycles per second). Use zero for maximum stiffness.
 
ref float LinearDampingRatio [get]
 Linear damping ratio, non-dimensional. Use 1 for critical damping.
 
ref float AngularDampingRatio [get]
 Linear damping ratio, non-dimensional. Use 1 for critical damping.
 
bool CollideConnected [get, set]
 Set this flag to true if the attached bodies should collide.
 
object? UserData [get, set]
 User data.
 

Detailed Description

Weld joint definition

A weld joint connect to bodies together rigidly. This constraint provides springs to mimic soft-body simulation. Note: The approximate solver in Box2D cannot hold many bodies together rigidly.

Constructor & Destructor Documentation

◆ WeldJointDef()

Box2D.WeldJointDef.WeldJointDef ( Body  bodyA,
Body  bodyB,
Vec2  anchorA,
Vec2  anchorB,
float  referenceAngle = 0::0f,
float  linearHertz = 0::0f,
float  angularHertz = 0::0f,
float  linearDampingRatio = 0::0f,
float  angularDampingRatio = 0::0f,
bool  collideConnected = false,
object?  userData = null 
)
inline

Construct a weld joint definition with the supplied values.

Parameters
bodyAThe first attached body
bodyBThe second attached body
anchorAThe local anchor point relative to bodyA's origin
anchorBThe local anchor point relative to bodyB's origin
referenceAngleThe bodyB angle minus bodyA angle in the reference state (radians)
linearHertzLinear stiffness expressed as Hertz (cycles per second). Use zero for maximum stiffness
angularHertzAngular stiffness as Hertz (cycles per second). Use zero for maximum stiffness
linearDampingRatioLinear damping ratio, non-dimensional. Use 1 for critical damping
angularDampingRatioAngular damping ratio, non-dimensional. Use 1 for critical damping
collideConnectedSet this flag to true if the attached bodies should collide
userDataUser data

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