Class GPoint3D

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class GPoint3D
    extends java.awt.geom.Point2D.Double
    Extends Point2D.Double to include a Z coordinate. This third coordinate is not in graphics coordinates as such, but it represents the depth of the point in the Z stack. There is no limit on the Z coordinate range, but lower values are closer to the viewer.
    Since:
    19 Jul 2018
    Author:
    Mark Taylor
    See Also:
    Serialized Form
    • Nested Class Summary

      • Nested classes/interfaces inherited from class java.awt.geom.Point2D

        java.awt.geom.Point2D.Double, java.awt.geom.Point2D.Float
    • Field Summary

      Fields 
      Modifier and Type Field Description
      double z
      The Z coordinate of this Point3D.
      • Fields inherited from class java.awt.geom.Point2D.Double

        x, y
    • Constructor Summary

      Constructors 
      Constructor Description
      GPoint3D()
      Constructs a point at the origin.
      GPoint3D​(double x, double y, double z)
      Constructs a point with given coordinates.
    • Method Summary

      • Methods inherited from class java.awt.geom.Point2D.Double

        getX, getY, setLocation, toString
      • Methods inherited from class java.awt.geom.Point2D

        clone, distance, distance, distance, distanceSq, distanceSq, distanceSq, equals, hashCode, setLocation
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • z

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

      • GPoint3D

        public GPoint3D()
        Constructs a point at the origin.
      • GPoint3D

        public GPoint3D​(double x,
                        double y,
                        double z)
        Constructs a point with given coordinates.
        Parameters:
        x - X graphics coordinate
        y - Y graphics coordinae
        z - depth coordinate