public static class PositionController.D extends PositionController
PositionController.D, PositionController.P, PositionController.PD| Modifier and Type | Field and Description |
|---|---|
private com.badlogic.gdx.math.Vector2 |
gain
the gain
|
defaultUserDataAccessor, vec2| Constructor and Description |
|---|
D(float gain) |
D(com.badlogic.gdx.math.Vector2 gain) |
| Modifier and Type | Method and Description |
|---|---|
com.badlogic.gdx.math.Vector2 |
calculateForce(com.badlogic.gdx.physics.box2d.Body body,
com.badlogic.gdx.math.Vector2 point) |
static float |
calculateForce(float gain,
float vel) |
static com.badlogic.gdx.math.Vector2 |
calculateForce(float gainX,
float gainY,
float velX,
float velY) |
static com.badlogic.gdx.math.Vector2 |
calculateForce(com.badlogic.gdx.math.Vector2 gain,
com.badlogic.gdx.math.Vector2 vel) |
com.badlogic.gdx.math.Vector2 |
calculateForceToCenter(com.badlogic.gdx.physics.box2d.Body body) |
com.badlogic.gdx.math.Vector2 |
getGain() |
void |
setGain(com.badlogic.gdx.math.Vector2 gain) |
applyForce, applyForceToCenter, applyForceToCenter, getUserDataAccessor, setUserDataAccessorpublic D(float gain)
gain - the gain on both axespublic D(com.badlogic.gdx.math.Vector2 gain)
gain - the gainpublic static float calculateForce(float gain,
float vel)
gain - the gainvel - the velocitygain * -velpublic static com.badlogic.gdx.math.Vector2 calculateForce(float gainX,
float gainY,
float velX,
float velY)
PositionController.vec2calculateForce(float, float)public static com.badlogic.gdx.math.Vector2 calculateForce(com.badlogic.gdx.math.Vector2 gain,
com.badlogic.gdx.math.Vector2 vel)
public com.badlogic.gdx.math.Vector2 calculateForce(com.badlogic.gdx.physics.box2d.Body body,
com.badlogic.gdx.math.Vector2 point)
calculateForce in class PositionControllerpoint - the world point at which the force should be appliedpublic com.badlogic.gdx.math.Vector2 calculateForceToCenter(com.badlogic.gdx.physics.box2d.Body body)
calculateForceToCenter in class PositionControllerpublic com.badlogic.gdx.math.Vector2 getGain()
gainpublic void setGain(com.badlogic.gdx.math.Vector2 gain)
gain - the gain to set