|
||||||||
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 dimensions, with the additional value for homogeneous coordinates.
Field Summary | |
---|---|
static Point |
ORIGIN
|
Method Summary | |
---|---|
Point |
add(Vector v)
Returns the point reached by starting at this point and adding a vector scaled by the given scalar. |
Point |
addScaled(double scalar,
Vector v)
Returns the point reached by starting at this point and adding a vector scaled by the given scalar. |
static Point |
create(double x,
double y,
double z)
Creates a point with the given coordinates, where the homogeneous value is 1. |
static Point |
create(double x,
double y,
double z,
double h)
Creates a point with the given coordinates. |
double |
getDistanceTo(Point other)
Returns the distance from this point to the other point, both being scaled by their homogeneous coordinates. |
double |
getHomogeneous()
Returns the value added to this point for homogeneous coordinates. |
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 starting at the other point and going to this point. |
java.lang.String |
toString()
Returns a conventional string representation of this point. |
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 double getHomogeneous()
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)
public static Point create(double x, double y, double z, double h)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |