Bacon2D

DistanceJoint QML Type

Distance Joint More...

Import Statement: import Bacon2D 1.0
Inherits:

Joint

Properties

Methods

Detailed Description

A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.

Property Documentation

dampingRatio : float

This property holds the mass-spring-damper frequency in Hertz. A value of 0 disables softness.


frequencyHz : float

This property holds the mass-spring-damper frequency in Hertz. A value of 0 disables softness.


length : float

This property holds the natural length between the anchor points.


localAnchorA : QPointF

This property holds the local anchor point relative to bodyA's origin


localAnchorB : QPointF

This property holds the local anchor point relative to bodyB's origin


Method Documentation

QPointF getReactionForce(float inv_dt) const

Get the reaction force given the inverse time step.


float getReactionTorque(float inv_dt) const

Get the reaction torque given the inverse time step. Unit is N*m. This is always zero for a distance joint.