|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.physics.box2d.Joint
com.badlogic.gdx.physics.box2d.joints.MouseJoint
public class MouseJoint
A mouse joint is used to make a point on a body track a specified world point. This a soft constraint with a maximum force. This allows the constraint to stretch and without applying huge forces. NOTE: this joint is not documented in the manual because it was developed to be used in the testbed. If you want to learn how to use the mouse joint, look at the testbed.
Constructor Summary | |
---|---|
MouseJoint(World world,
long addr)
|
Method Summary | |
---|---|
float |
getDampingRatio()
Set/get the damping ratio (dimensionless). |
float |
getFrequency()
Set/get the frequency in Hertz. |
float |
getMaxForce()
Set/get the maximum force in Newtons. |
Vector2 |
getTarget()
|
void |
setDampingRatio(float ratio)
Set/get the damping ratio (dimensionless). |
void |
setFrequency(float hz)
Set/get the frequency in Hertz. |
void |
setMaxForce(float force)
Set/get the maximum force in Newtons. |
void |
setTarget(Vector2 target)
Use this to update the target point. |
Methods inherited from class com.badlogic.gdx.physics.box2d.Joint |
---|
getAnchorA, getAnchorB, getBodyA, getBodyB, getReactionForce, getReactionTorque, getType, getUserData, isActive, setUserData |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MouseJoint(World world, long addr)
Method Detail |
---|
public void setTarget(Vector2 target)
public Vector2 getTarget()
public void setMaxForce(float force)
public float getMaxForce()
public void setFrequency(float hz)
public float getFrequency()
public void setDampingRatio(float ratio)
public float getDampingRatio()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |