Class Point3D.Double

    • Field Summary

      Fields 
      Modifier and Type Field Description
      double x
      The X coordinate of this Point3D.
      double y
      The Y coordinate of this Point3D.
      double z
      The Z coordinate of this Point3D.
    • Constructor Summary

      Constructors 
      Constructor Description
      Double()
      Constructs and initializes a Point3D with coordinates (0, 0, 0).
      Double​(double x, double y, double z)
      Constructs and initializes a Point3D with the specified coordinates.
    • Field Detail

      • x

        public double x
        The X coordinate of this Point3D.
      • y

        public double y
        The Y coordinate of this Point3D.
      • z

        public double z
        The Z coordinate of this Point3D.
    • Constructor Detail

      • Double

        public Double()
        Constructs and initializes a Point3D with coordinates (0, 0, 0).
      • Double

        public Double​(double x,
                      double y,
                      double z)
        Constructs and initializes a Point3D with the specified coordinates.
        Parameters:
        x - the X coordinate of the newly constructed Point3D
        y - the Y coordinate of the newly constructed Point3D
        z - the Z coordinate of the newly constructed Point3D
    • Method Detail

      • getX

        public double getX()
        Returns the X coordinate of this Point3D in double precision.
        Specified by:
        getX in class Point3D
        Returns:
        the X coordinate of this Point3D.
      • getY

        public double getY()
        Returns the Y coordinate of this Point3D in double precision.
        Specified by:
        getY in class Point3D
        Returns:
        the Y coordinate of this Point3D.
      • getZ

        public double getZ()
        Returns the Z coordinate of this Point3D in double precision.
        Specified by:
        getZ in class Point3D
        Returns:
        the Z coordinate of this Point3D.
      • setLocation

        public void setLocation​(double x,
                                double y,
                                double z)
        Sets the location of this Point3D to the specified double coordinates.
        Specified by:
        setLocation in class Point3D
        Parameters:
        x - the new X coordinate of this Point3D
        y - the new Y coordinate of this Point3D
        z - the new Z coordinate of this Point3D
      • moveBy

        public void moveBy​(double dx,
                           double dy,
                           double dz)
        Moves the Point3D by the amount indicated by the specified double magnitudes.

        NOTE: Units are NOT considered. The units of the origin and (u, v, w) components are assumed to be the same.
        Therefore conversions (i.e. from DD to Meters) should happen BEFORE calling this method.

        Specified by:
        moveBy in class Point3D
        Parameters:
        dx - the amount to move this Point3D in the X direction
        dy - the amount to move this Point3D in the Y direction
        dz - the amount to move this Point3D in the Z direction
      • toString

        public String toString()
        Returns a String that represents the value of this Point3D.
        Overrides:
        toString in class Object
        Returns:
        a string representation of this Point3D.