Class Point


@Node public class Point extends Embedded
A point (3D coordinate) in space. Embedded in VRObject during serialization, does not exist on its own.
Author:
joe
  • Constructor Details

    • Point

      public Point(Point position)
    • Point

      public Point()
    • Point

      public Point(double x, double y, double z)
  • Method Details

    • getDistance

      public double getDistance(double x, double y, double z)
    • isInRange

      public boolean isInRange(Point p, double range)
    • isInRange

      public boolean isInRange(double x, double y, double z, double range)
    • copy

      public Point copy(Point p)
    • plus

      public Point plus(double val)
    • minus

      public Point minus(double val)
    • isEqual

      public boolean isEqual(Point p)
      Utility method, confirms that coordinates of this point match the coordinates of the other point. Method equals() can't be used for that purpose as it includes object id - requirement for persistence.
      Parameters:
      p - Point to compare
      Returns:
      true if all coordinates are equal
    • getX

      public double getX()
    • getY

      public double getY()
    • getZ

      public double getZ()
    • setX

      public void setX(double x)
    • setY

      public void setY(double y)
    • setZ

      public void setZ(double z)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Entity
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class Entity
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Entity
    • toString

      public String toString()
      Overrides:
      toString in class Entity