|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavaclient2.extra.PositionGeometryTools
public class PositionGeometryTools
Several methods for position geometric calculus.
Constructor Summary | |
---|---|
PositionGeometryTools()
|
Method Summary | |
---|---|
static float |
calcAngle(java.awt.Point p1,
java.awt.Point p2)
Calculate the angle between the line determined by the two points and the horizontal axis. |
static float |
calcDist(float x,
float y)
Calculate the distance between two X and Y points assuming that their counterparts are 0 using Pitagora's theorem. |
static float |
calcDist(java.awt.Point p1,
java.awt.Point p2)
Calculate the distance between two points (p1 and p2). |
static java.awt.Point |
calcDistPoint(java.awt.Point initP,
float dist,
float angle)
Calculate the coordinates of a point situated at distance dist, angle angle from a given point initP. |
static float |
calcX(java.awt.Point initP,
float dist,
float angle)
Calculate the X coordinate of a point situated at distance dist, angle angle from a given point initP. |
static float |
calcY(java.awt.Point initP,
float dist,
float angle)
Calculate the Y coordinate of a point situated at distance dist, angle angle from a given point initP. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PositionGeometryTools()
Method Detail |
---|
public static float calcDist(float x, float y)
x
- X's coordonate of the first point (Y=0)y
- Y's coordonate of the second point (X=0)
public static float calcDist(java.awt.Point p1, java.awt.Point p2)
p1
- first pointp2
- second point
public static float calcX(java.awt.Point initP, float dist, float angle)
initP
- reference pointdist
- distance from the reference point to the desired pointangle
- angle from the reference point to the desired point
public static float calcY(java.awt.Point initP, float dist, float angle)
initP
- reference pointdist
- distance from the reference point to the desired pointangle
- angle from the reference point to the desired point
public static java.awt.Point calcDistPoint(java.awt.Point initP, float dist, float angle)
initP
- reference pointdist
- distance from the reference point to the desired pointangle
- angle from the reference point to the desired point
public static float calcAngle(java.awt.Point p1, java.awt.Point p2)
p1
- First pointp2
- Second point
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |