Class BetaVertex
java.lang.Object
jaba.BetaVertex
A class defining a vertex.
- Version:
- 1.1
- Author:
- Chris Pudney
cpudney@alphapharm.pharm.uwa.edu.au
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic BetaVertex[]bounds(BetaVertex v1, BetaVertex v2, BetaVertex v3) Returns the pair of vertices that bound three collinear vertices.booleanstatic booleancollinear(BetaVertex v1, BetaVertex v2, BetaVertex v3) Tests whether three vertices are collinear.static doubledistanceSquared(BetaVertex v1, BetaVertex v2) Returns the square of the distance between two vertices.double[]doublegetX()doublegetY()doublegetZ()static booleansameVertex(BetaVertex v1, BetaVertex v2) Tests whether two vertices are the same point.toString()Returns a string that describes a vertex.
-
Constructor Details
-
BetaVertex
public BetaVertex() -
BetaVertex
public BetaVertex(double x, double y, double z) -
BetaVertex
public BetaVertex(double[] v)
-
-
Method Details
-
getCoords
public double[] getCoords() -
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
sameVertex
Tests whether two vertices are the same point.- Returns:
- True/false if the vertices are the same/different.
-
collinear
Tests whether three vertices are collinear.- Returns:
- True/false if the vertices are collinear/non-collinear
-
bounds
Returns the pair of vertices that bound three collinear vertices.- Returns:
- An array of two vertices that bound the tested vertices
-
distanceSquared
Returns the square of the distance between two vertices.- Returns:
- the distance squared between them
-
CircaEquals
-
toString
-