| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjist.swans.misc.Location
jist.swans.misc.Location.Location3D
public static final class Location.Location3D
A three-dimensional location implementation.
| Nested Class Summary | 
|---|
| Nested classes/interfaces inherited from class jist.swans.misc.Location | 
|---|
| Location.Location2D, Location.Location3D | 
| Constructor Summary | |
|---|---|
| Location.Location3D(float x,
                    float y,
                    float z)Create three-dimensional coordinate. | |
| Method Summary | |
|---|---|
|  void | add(Location l)Vector addition of locations... | 
|  float | distance(Location l)Compute distance between two locations. | 
|  float | distanceSqr(Location l)Compute distance squared between two locations. | 
|  float | getHeight()Return height of location. | 
|  float | getX()Return X-coordinate of location. | 
|  float | getY()Return Y-coordinate of location. | 
|  boolean | inside(Location bounds)Determine whether point is inside bounds. | 
|  boolean | inside(Location min,
       Location max)Determine whether points is inside bounds. | 
|  Location | step(Location l,
     int steps)Divide (scale) vector from current to second location into a number of equal step (displacement) vectors. | 
|  java.lang.String | toString() | 
| Methods inherited from class jist.swans.misc.Location | 
|---|
| getClone, parse | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Constructor Detail | 
|---|
public Location.Location3D(float x,
                           float y,
                           float z)
x - x-coordinatey - y-coordinatez - z-coordinate| Method Detail | 
|---|
public float distanceSqr(Location l)
distanceSqr in class Locationl - second location
public float distance(Location l)
distance in class Locationl - second location
public Location step(Location l,
                     int steps)
step in class Locationl - destination locationsteps - number of steps to destination
public float getX()
getX in class Locationpublic float getY()
getY in class Locationpublic float getHeight()
getHeight in class Locationpublic boolean inside(Location bounds)
inside in class Locationbounds - bounds to test again
public boolean inside(Location min,
                      Location max)
inside in class Locationmin - lower left boundmax - upper right bound
public void add(Location l)
add in class Locationl - second location / displacementpublic java.lang.String toString()
toString in class java.lang.Object| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||