Package quadbase.util

Class Point_3D

java.lang.Object
quadbase.util.Point_3D
All Implemented Interfaces:
Cloneable

public class Point_3D extends Object implements Cloneable
This class contains methods to define and manipulate a 3D Point. The coordinates of the point are floating point numbers and can represent a relative position in the main chart window.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    float
    The x, y, z coordinates.
    float
    The x, y, z coordinates.
    float
    The x, y, z coordinates.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Null constructor
    Point_3D(float _x, float _y, float _z)
    Constructor based on values
    Copy Constructor based on values
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the two points are the same or not.
    float
    Get value of x.
    float
    Get value of y.
    float
    Get value of z.
    int
    Returns the hash code for the object.
    void
    Set the values based on the given point.
    void
    setX(float f)
    Set value of x.
    void
    setY(float f)
    Set value of y.
    void
    setZ(float f)
    Set value of z.
    Returns the string representation of a 3D point

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • x

      public float x
      The x, y, z coordinates.
    • y

      public float y
      The x, y, z coordinates.
    • z

      public float z
      The x, y, z coordinates.
  • Constructor Details

    • Point_3D

      public Point_3D()
      Null constructor
    • Point_3D

      public Point_3D(float _x, float _y, float _z)
      Constructor based on values
    • Point_3D

      public Point_3D(Point_3D p)
      Copy Constructor based on values
  • Method Details

    • toString

      public String toString()
      Returns the string representation of a 3D point
      Overrides:
      toString in class Object
      Returns:
      the string representation a point
    • equals

      public boolean equals(Object o)
      Checks if the two points are the same or not.
      Overrides:
      equals in class Object
      Returns:
      true iff coordinates of both vertices are equal.
    • hashCode

      public int hashCode()
      Returns the hash code for the object.
      Overrides:
      hashCode in class Object
      Returns:
      The int hash code.
    • getX

      public float getX()
      Get value of x.
      Returns:
      value of x
    • getY

      public float getY()
      Get value of y.
      Returns:
      value of y
    • getZ

      public float getZ()
      Get value of z.
      Returns:
      value of z
    • setX

      public void setX(float f)
      Set value of x.
      Parameters:
      f - The x coordinate.
    • setY

      public void setY(float f)
      Set value of y.
      Parameters:
      f - The y coordinate.
    • setZ

      public void setZ(float f)
      Set value of z.
      Parameters:
      z - The z coordinate.
    • set

      public void set(Point_3D p)
      Set the values based on the given point.
      Parameters:
      p - The input Point_3D object.