|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectProGAL.geomNd.Point
ProGAL.geom3d.Point
public class Point
A point in (x,y,z)-space represented with double precision.
Constructor Summary | |
---|---|
Point(double[] coords)
Construct a point with the specified coordinates. |
|
Point(double x,
double y,
double z)
Construct a point with the specified coordinates. |
|
Point(Point p)
Construct a point that is a clone of p. |
|
Point(Vector v)
Construct a point at the coordinates of v. |
Method Summary | |
---|---|
Point |
add(Vector p)
Returns p added to this (without changing this object). |
Point |
addThis(Point p)
|
Point |
addThis(Vector p)
Returns p added to this (changing this object). |
Point |
clone()
Return a new object that equals this object. |
static boolean |
collinear(Point p0,
Point p1,
Point p2)
Returns true if three points are on the same line. |
static boolean |
coplanar(Point p0,
Point p1,
Point p2,
Point p3)
Returns true if four specified points are in the same plane |
double |
distance(Point q)
Get the distance from this point to point q |
double |
distanceSquared(Point q)
Get the squared distance from this point to point q. |
boolean |
dominates(Point q)
Returns true if this point dominates point q. |
boolean |
dominates(Point q,
int i,
int j,
int k)
Returns true if this point dominates point q (i=0,1,2 is the most important coordinate, j=0,1,2 is the second most important coordinate and k=0,1,2 is the least important coordinate). |
double |
dot(Point p)
|
double |
dot(Vector v)
|
boolean |
equals(java.lang.Object o)
Returns true iff o is a point that equals this point. |
boolean |
equals(Point p)
Returns true iff this point and point p are overlapping. |
static double |
getAngle(Point p1,
Point p2,
Point p3)
Get the angle between the line segments p2->p1 and p2->p3. |
static Plane |
getBisector(Point p,
Point q)
Creates a bisector between points p and q |
Point |
getCenter()
Returns a clone of this point. |
static Point |
getCircumCenter(Point a,
Point b,
Point c)
|
static double |
getCosDihedralAngle(Point p1,
Point p2,
Point p3,
Point p4)
|
static double |
getDihedralAngle(Point p1,
Point p2,
Point p3,
Point p4)
Get the dihedral angle defined by the 4 non-collinear points p1, p2, p3, p4. |
int |
getDimension()
Return the 'dimension' of this object. |
static Point |
getEquilateralPoint(Point a,
Point b,
Point c)
|
static Point |
getMidpoint(Point p,
Point q)
Creates the midpoint of two points. |
Point |
getPoint(int i)
TODO: Comment |
static Point |
getSteinerPoint(Point a,
Point b,
Point c)
|
static double |
inSphere(Point p,
Point q,
Point r,
Point s,
Point t)
Returns a positive double if point t is inside the sphere through points p, q, r, s. |
static void |
main(java.lang.String[] args)
|
static double |
orientation(Point p,
Point q,
Point r,
Point s)
|
static double |
orientation(Point p,
Point q,
Point r,
Point s,
Point t)
|
double |
polarAngleCosZ()
Returns the cosinus of the polar angle of this point with the z-axis |
double |
polarAngleSinZ()
Returns the sinus of the polar angle of this point with the z-axis |
Point |
reflectThroughOrigoThis()
Reflects this point through origo. |
void |
rotation(Vector v,
double alpha)
rotates (clockwise) the point around the line through the origo with the direction unit vector v. |
void |
rotation(Vector v,
double alpha,
Point p)
rotates (clockwise) the point around the line through the point p with the direction unit vector v. |
void |
scaleThis(double s)
Scale this point by a factor s |
void |
setX(double x)
Set the first coordinate |
void |
setY(double y)
Set the second coordinate |
void |
setZ(double z)
Set the third coordinate |
Point |
subtract(Vector p)
Returns p subtracted from this (without changing this object). |
Point |
subtractThis(Point p)
|
Point |
subtractThis(Vector p)
Returns p subtracted from this (changing this object). |
void |
toConsole()
Writes this point to System.out . |
void |
toConsole(int dec)
Writes this point to System.out with dec decimals precision. |
void |
toScene(J3DScene scene,
double r,
java.awt.Color clr)
|
java.lang.String |
toString()
Returns a string-representation of this point formatted with two decimals precision. |
java.lang.String |
toString(int dec)
Returns a string-representation of this point formatted with dec decimals precision. |
Vector |
toVector()
Returns the vector from origo to this point. |
void |
translateThis(double dx,
double dy,
double dz)
Translates this point by (x,y,z). |
Vector |
vectorTo(Point p)
Get the vector that points from this point to p |
double |
x()
Get the first coordinate. |
double |
y()
Get the second coordinate. |
double |
z()
Get the third coordinate. |
Methods inherited from class ProGAL.geomNd.Point |
---|
addThis, distance, distance, distanceSquared, distanceSquared, distanceSquaredXY, distanceXY, dot, get, getCoord, getCoords, getDimensions, multiplyThis, polarAngleCosXY, polarAngleSinXY, polarAngleXY, set, set, setCoord, setCoord, vectorTo |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Point(double x, double y, double z)
public Point(double[] coords)
public Point(Point p)
public Point(Vector v)
Method Detail |
---|
public double x()
public double y()
public double z()
public void setX(double x)
public void setY(double y)
public void setZ(double z)
public int getDimension()
getDimension
in interface Simplex
public Vector vectorTo(Point p)
public static boolean collinear(Point p0, Point p1, Point p2)
public static boolean coplanar(Point p0, Point p1, Point p2, Point p3)
public static double orientation(Point p, Point q, Point r, Point s)
public static double orientation(Point p, Point q, Point r, Point s, Point t)
public static double inSphere(Point p, Point q, Point r, Point s, Point t)
public void translateThis(double dx, double dy, double dz)
public void scaleThis(double s)
public Point addThis(Vector p)
public Point addThis(Point p)
public Point add(Vector p)
public Point subtractThis(Vector p)
public Point subtractThis(Point p)
public Point subtract(Vector p)
public Point reflectThroughOrigoThis()
public void rotation(Vector v, double alpha)
public void rotation(Vector v, double alpha, Point p)
public double polarAngleSinZ()
public double polarAngleCosZ()
public double distanceSquared(Point q)
public double distance(Point q)
public double dot(Point p)
public double dot(Vector v)
public static Plane getBisector(Point p, Point q)
public static Point getMidpoint(Point p, Point q)
public static double getAngle(Point p1, Point p2, Point p3)
public static double getDihedralAngle(Point p1, Point p2, Point p3, Point p4)
public static double getCosDihedralAngle(Point p1, Point p2, Point p3, Point p4)
public boolean dominates(Point q)
public boolean dominates(Point q, int i, int j, int k)
public Point getCenter()
getCenter
in interface Shape
public Point getPoint(int i)
Simplex
getPoint
in interface Simplex
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean equals(Point p)
public static Point getCircumCenter(Point a, Point b, Point c)
public static Point getEquilateralPoint(Point a, Point b, Point c)
public static Point getSteinerPoint(Point a, Point b, Point c)
public Point clone()
clone
in class Point
public Vector toVector()
toVector
in class Point
public java.lang.String toString()
toString
in class Point
public java.lang.String toString(int dec)
dec
decimals precision.
toString
in class Point
public void toScene(J3DScene scene, double r, java.awt.Color clr)
public void toConsole()
System.out
.
toConsole
in class Point
public void toConsole(int dec)
System.out
with dec
decimals precision.
toConsole
in class Point
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |