APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.physics.box2d.joints

public Class FrictionJoint

extends Joint
Class Inheritance
Imports
com.badlogic.gdx.math.Vector2, com.badlogic.gdx.physics.box2d.Joint, .World

Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.

Field Summary

Modifier and TypeField and Description
private final Vector2
private final Vector2
private final float[]
Inherited from com.badlogic.gdx.physics.box2d.Joint:
addrjointEdgeAjointEdgeB

Constructor Summary

AccessConstructor and Description
public
FrictionJoint(World world, long addr)

Method Summary

Modifier and TypeMethod and Description
public Vector2
public Vector2
public float
getMaxForce()

Get the maximum friction force in N.

public float
getMaxTorque()

Get the maximum friction torque in N*m.

private native void
jniGetLocalAnchorA(long addr, float[] anchor)

private native void
jniGetLocalAnchorB(long addr, float[] anchor)

private native float
jniGetMaxForce(long addr)

private native float
jniGetMaxTorque(long addr)

private native void
jniSetMaxForce(long addr, float force)

private native void
jniSetMaxTorque(long addr, float torque)

public void
setMaxForce(float force)

Set the maximum friction force in N.

public void
setMaxTorque(float torque)

Set the maximum friction torque in N*m.

Inherited from com.badlogic.gdx.physics.box2d.Joint:
getAnchorAgetAnchorBgetBodyAgetBodyBgetCollideConnectedgetReactionForcegetReactionTorquegetTypegetUserDataisActivesetUserData

Field Detail

localAnchorAback to summary
private final Vector2 localAnchorA
localAnchorBback to summary
private final Vector2 localAnchorB
tmpback to summary
private final float[] tmp

Hides com.badlogic.gdx.physics.box2d.Joint.tmp.

Constructor Detail

FrictionJointback to summary
public FrictionJoint(World world, long addr)

Method Detail

getLocalAnchorAback to summary
public Vector2 getLocalAnchorA()
getLocalAnchorBback to summary
public Vector2 getLocalAnchorB()
getMaxForceback to summary
public float getMaxForce()

Get the maximum friction force in N.

getMaxTorqueback to summary
public float getMaxTorque()

Get the maximum friction torque in N*m.

jniGetLocalAnchorAback to summary
private native void jniGetLocalAnchorA(long addr, float[] anchor)
jniGetLocalAnchorBback to summary
private native void jniGetLocalAnchorB(long addr, float[] anchor)
jniGetMaxForceback to summary
private native float jniGetMaxForce(long addr)
jniGetMaxTorqueback to summary
private native float jniGetMaxTorque(long addr)
jniSetMaxForceback to summary
private native void jniSetMaxForce(long addr, float force)
jniSetMaxTorqueback to summary
private native void jniSetMaxTorque(long addr, float torque)
setMaxForceback to summary
public void setMaxForce(float force)

Set the maximum friction force in N.

setMaxTorqueback to summary
public void setMaxTorque(float torque)

Set the maximum friction torque in N*m.