|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPoint
public class Point
Represents a point in three-dimensional coordinates.
Field Summary | |
---|---|
static Point |
ORIGIN
The origin point, with zero for all coordinates. |
Method Summary | |
---|---|
Point |
add(Vector v)
Returns a copy of this point shifted by the given * vector. |
Point |
addScaled(double scalar,
Vector v)
Returns a copy of this point shifted by the given vector scaled by the given scalar. |
static Point |
create(double x,
double y,
double z)
Constructs a point with the given coordinates. |
double |
getDistanceTo(Point other)
Returns the distance between this point and the parameter point. |
double |
getX()
Returns the x-coordinate of this point. |
double |
getY()
Returns the y-coordinate of this point. |
double |
getZ()
Returns the z-coordinate of this point. |
Vector |
subtract(Point other)
Returns the vector from the parameter point to this point - ie, one whose components are the difference of this vector's coordinates and the parameter vector's coordinates. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static Point ORIGIN
Method Detail |
---|
public double getX()
public double getY()
public double getZ()
public java.lang.String toString()
toString
in class java.lang.Object
public double getDistanceTo(Point other)
public Vector subtract(Point other)
public Point addScaled(double scalar, Vector v)
public Point add(Vector v)
public static Point create(double x, double y, double z)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |