Class Point3d

java.lang.Object
au.edu.unsw.cse.Point3d
Direct Known Subclasses:
Point3dObject3d

public class Point3d
extends java.lang.Object
  • Field Details

  • Constructor Details

    • Point3d

      public Point3d()
    • Point3d

      public Point3d​(double x, double y, double z)
  • Method Details

    • fromSpherical

      public static Point3d fromSpherical​(double r, double theta, double phi)
    • fromCylindrical

      public static Point3d fromCylindrical​(double r, double theta, double y)
    • x

      public double x()
    • y

      public double y()
    • z

      public double z()
    • theta

      public double theta()
    • r

      public double r()
    • toString

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

      public static Point3d fromString​(java.lang.String s) throws java.lang.NumberFormatException
      Throws:
      java.lang.NumberFormatException
    • toVRML

      public java.lang.String toVRML()
    • add

      public Point3d add​(Point3d x)
    • subtract

      public Point3d subtract​(Point3d x)
    • scale

      public Point3d scale​(double x)
    • scale

      public Point3d scale​(double x, double y, double z)
    • dot

      public double dot​(Point3d x)
    • normalize

      public Point3d normalize()
    • length

      public double length()
    • cross

      public Point3d cross​(Point3d x)
    • setSeed

      public static void setSeed​(long seed)
      Set seed of random number generator
    • random

      public static Point3d random()
      Random in unit cube
    • randomGaussian

      public static Point3d randomGaussian()
      Random Gaussian
    • randomInSphere

      public static Point3d randomInSphere()
      Random in unit sphere
    • randomInCircle

      public static Point3d randomInCircle()
      Random in unit circle
    • randomOnSphere

      public static Point3d randomOnSphere()
      Random on unit sphere
    • randomOnCircle

      public static Point3d randomOnCircle()
      Random on unit circle