| Method from net.claribole.zvtm.engine.Location Detail: |
public static boolean equals(Location l1,
Location l2) {
if (l1.getX()==l2.getX() && l1.getY()==l2.getY() && l1.getAltitude()==l2.getAltitude()){return true;}
else return false;
}
|
public float getAltitude() {
return alt;
}
|
public static Vector getDifference(Location l1,
Location l2) {
Vector res=new Vector();
Float f=new Float(l2.getAltitude()-l1.getAltitude());
res.add(f);
LongPoint p=new LongPoint(l2.getX()-l1.getX(),l2.getY()-l1.getY());
res.add(p);
return res;
}
returns the difference betzeen two locations (l2-l1, how much to go from l1 to l2) as a vector whose first element is the altitude difference and second element is a LongPoint for X,Y difference |
public long getX() {
return vx;
}
|
public long getY() {
return vy;
}
|
public void setAltitude(float a) {
alt=a;
}
|
public LongPoint setPosition() {
return new LongPoint(vx,vy);
}
|
public void setPosition(LongPoint p) {
vx=p.x;
vy=p.y;
}
|
public void setPositionX(long x) {
vx=x;
}
|
public void setPositionY(long y) {
vy=y;
}
|
public String toString() {
return "x="+vx+", y="+vy+", alt="+alt;
}
|