Package PamUtils

Class Coordinate3d

java.lang.Object
PamUtils.Coordinate3d
All Implemented Interfaces:
Serializable, Cloneable, ManagedParameters, PamCoordinate

public class Coordinate3d extends Object implements Serializable, Cloneable, PamCoordinate, ManagedParameters
Class definition for a x,y coordinate number type.
Author:
David McLaren
See Also:
  • Field Details

    • x

      public double x
    • y

      public double y
    • z

      public double z
  • Constructor Details

    • Coordinate3d

      public Coordinate3d()
    • Coordinate3d

      public Coordinate3d(double x, double y)
    • Coordinate3d

      public Coordinate3d(double x, double y, double z)
    • Coordinate3d

      public Coordinate3d(Coordinate3d a)
  • Method Details

    • assign

      public void assign(Coordinate3d a)
    • getXYPoint

      public Point getXYPoint()
    • getPoint2D

      public Point2D getPoint2D()
      Get a double precision point
      Returns:
      Doube precision Point2D.
    • getPoint2DFX

      public javafx.geometry.Point2D getPoint2DFX()
      Get a double precision point output as a JavaFX library Point2D object.
      Returns:
      Doube precision Point2D.
    • distance

      public double distance(Coordinate3d o)
      Get the geometric distance between two coordinates.
      Parameters:
      o - other coordinate.
      Returns:
      geometric distance.
    • getCoordinate

      public double getCoordinate(int iCoordinate)
      Description copied from interface: PamCoordinate
      Get an indexed coordinate.
      Specified by:
      getCoordinate in interface PamCoordinate
      Parameters:
      iCoordinate - coordinate index.
      Returns:
      coordinate value.
    • setCoordinate

      public void setCoordinate(int iCoordinate, double value)
      Description copied from interface: PamCoordinate
      Set a coordinate value
      Specified by:
      setCoordinate in interface PamCoordinate
      Parameters:
      iCoordinate - index of coordinate (0,1,2)
      value - value to set.
    • getNumCoordinates

      public int getNumCoordinates()
      Specified by:
      getNumCoordinates in interface PamCoordinate
      Returns:
      the number of coordinates.
    • clone

      public Coordinate3d clone()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getParameterSet

      public PamParameterSet getParameterSet()
      Description copied from interface: ManagedParameters
      Get a set of data that describes all of the parameters in a class
      Specified by:
      getParameterSet in interface ManagedParameters
      Returns:
      description of the parameters in a class.