Class Point3D

java.lang.Object
org.gvsig.dwg.lib.util.Point3D

public final class Point3D extends Object
3dim double point. A point is transformed different than a vector. The class is now declared final to allow a more aggresive optimization.
Version:
1.10, 01/13/99
  • Field Details

    • x

      public double x
    • y

      public double y
    • z

      public double z
  • Constructor Details

    • Point3D

      public Point3D()
    • Point3D

      public Point3D(Point3D p)
      Copy constructor.
      Parameters:
      p - point to copy
    • Point3D

      public Point3D(double xx, double yy, double zz)
      Parameters:
      xx - x coord
      yy - y coord
      zz - z coord
  • Method Details

    • scale

      public void scale(double f)
      Scale.
      Parameters:
      f - scaling factor
    • add

      public void add(Vector3D v)
      Add a vector.
      Parameters:
      v - vector to add
    • plus

      public Point3D plus(Vector3D v)
      Get sum with vector.
      Parameters:
      v - vector to add
      Returns:
      this+v
    • sub

      public void sub(Vector3D v)
      Substract a vector.
      Parameters:
      v - vector to substract
    • minus

      public Point3D minus(Vector3D v)
      Get difference with vector.
      Parameters:
      v - vector to substract
      Returns:
      this-v
    • minus

      public Vector3D minus(Point3D p)
      Get difference with point.
      Parameters:
      p - point to substract
      Returns:
      this-p
    • toString

      public String toString()
      Output.
      Overrides:
      toString in class Object
      Returns:
      output string