Joint

abstract class Joint

Abstract class for joints holding all the common properties of joints.

Parameters

body

A body the joint is attached to

naturalLength

The desired distance of the joint between two points/bodies

springConstant

The strength of the joint

dampeningConstant

The dampening constant to use for the joints forces

canGoSlack

Boolean whether the joint can go slack or not

offset

Offset to be applied to the location of the joint relative to b1's object space.

Functions

Link copied to clipboard
abstract fun applyTension()

Abstract method to apply tension to the joint

Link copied to clipboard
abstract fun calculateTension(): Double

Abstract method to calculate tension between the joint

Link copied to clipboard
abstract fun rateOfChangeOfExtension(): Double

Determines the rate of change between two objects/points.

Properties

Link copied to clipboard
var object1AttachmentPoint: Vec2

Inheritors

Link copied to clipboard
Link copied to clipboard