public final class Force extends Object
Constructor and Description |
---|
Force()
Constructor.
|
Force(double fh,
double fv)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addForce(double fh,
double fv)
Increase forces with input value.
|
void |
addForce(Force force)
Increase force with input value.
|
double |
getForceHorizontal()
Get horizontal force.
|
double |
getForceVertical()
Get vertical force.
|
void |
reachForce(double extrp,
Force force,
double speed,
double sensibility)
Reach specified force at the specified speed.
|
void |
setForce(double fh,
double fv)
Set forces.
|
void |
setForce(Force force)
Set force.
|
void |
setForceMaximum(Force max)
Set the maximum reachable force.
|
void |
setForceMinimum(Force min)
Set the minimum reachable force.
|
public static final Force ZERO
public Force()
public Force(double fh, double fv)
fh
- The horizontal force.fv
- The vertical force.public void reachForce(double extrp, Force force, double speed, double sensibility)
update(extrp)
function.extrp
- The extrapolation value.force
- The force to reach.speed
- The reach speed.sensibility
- The sensibility value (will round to destination between -sensibility and +sensibility).public void addForce(Force force)
force
- The force to add.public void addForce(double fh, double fv)
fh
- The added horizontal force.fv
- The added vertical force.public void setForce(Force force)
force
- The force.public void setForce(double fh, double fv)
fh
- The horizontal force.fv
- The vertical force.public void setForceMaximum(Force max)
max
- The force max.public void setForceMinimum(Force min)
min
- The force min.public double getForceHorizontal()
public double getForceVertical()
Copyright © 2014 Byron 3D Games Studio. All rights reserved.