Class Point


  • public final class Point
    extends java.lang.Object

    A Point represents a point in 3D space, and is the building block upon which the 3D representation of the Graphs is based.

    This class is used internally by the library, and is of no interest to end users.

    • Constructor Summary

      Constructors 
      Constructor Description
      Point​(double x, double y)
      Create a point in 2D space (i.e. with a zero Z axis)
      Point​(double x, double y, double z)
      Create a point at the given position in 3D space.
      Point​(java.lang.Double x, java.lang.Double y, java.lang.Double z)
      Create a point at the given position in 3D space.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object clone()  
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      void moveBy​(org.faceless.graph.Vector v)
      Move a point by the specified Vector
      Point moveByClone​(org.faceless.graph.Vector v)  
      java.lang.String toString()  
      void transform​(org.faceless.graph.Transformer tr)
      Transform the point using the given transformer
      double x()
      Get the X position for this point
      double y()
      Get the Y position for this point
      double z()
      Get the Z position for this point
      • Methods inherited from class java.lang.Object

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

      • Point

        public Point​(java.lang.Double x,
                     java.lang.Double y,
                     java.lang.Double z)
        Create a point at the given position in 3D space. X, Y and Z must be valid doubles, i.e. their values must not be null, infinate or NaN.
      • Point

        public Point​(double x,
                     double y)
        Create a point in 2D space (i.e. with a zero Z axis)
      • Point

        public Point​(double x,
                     double y,
                     double z)
        Create a point at the given position in 3D space.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • x

        public double x()
        Get the X position for this point
      • y

        public double y()
        Get the Y position for this point
      • z

        public double z()
        Get the Z position for this point
      • transform

        public void transform​(org.faceless.graph.Transformer tr)
        Transform the point using the given transformer
      • moveBy

        public void moveBy​(org.faceless.graph.Vector v)
        Move a point by the specified Vector
      • moveByClone

        public Point moveByClone​(org.faceless.graph.Vector v)
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object