Class BetaVertex

java.lang.Object
jaba.BetaVertex

public class BetaVertex extends Object
A class defining a vertex.
Version:
1.1
Author:
Chris Pudney cpudney@alphapharm.pharm.uwa.edu.au
  • 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

      public static boolean sameVertex(BetaVertex v1, BetaVertex v2)
      Tests whether two vertices are the same point.
      Returns:
      True/false if the vertices are the same/different.
    • collinear

      public static boolean collinear(BetaVertex v1, BetaVertex v2, BetaVertex v3)
      Tests whether three vertices are collinear.
      Returns:
      True/false if the vertices are collinear/non-collinear
    • bounds

      public static BetaVertex[] bounds(BetaVertex v1, BetaVertex v2, BetaVertex v3)
      Returns the pair of vertices that bound three collinear vertices.
      Returns:
      An array of two vertices that bound the tested vertices
    • distanceSquared

      public static double distanceSquared(BetaVertex v1, BetaVertex v2)
      Returns the square of the distance between two vertices.
      Returns:
      the distance squared between them
    • CircaEquals

      public boolean CircaEquals(BetaVertex b)
    • toString

      public String toString()
      Returns a string that describes a vertex.
      Overrides:
      toString in class Object