Package au.edu.unsw.cse
Class Point3d
java.lang.Object
au.edu.unsw.cse.Point3d
- Direct Known Subclasses:
Point3dObject3d
public class Point3d
extends java.lang.Object
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description Point3d
add(Point3d x)
Point3d
cross(Point3d x)
double
dot(Point3d x)
static Point3d
fromCylindrical(double r, double theta, double y)
static Point3d
fromSpherical(double r, double theta, double phi)
static Point3d
fromString(java.lang.String s)
double
length()
Point3d
normalize()
double
r()
static Point3d
random()
Random in unit cubestatic Point3d
randomGaussian()
Random Gaussianstatic Point3d
randomInCircle()
Random in unit circlestatic Point3d
randomInSphere()
Random in unit spherestatic Point3d
randomOnCircle()
Random on unit circlestatic Point3d
randomOnSphere()
Random on unit spherePoint3d
scale(double x)
Point3d
scale(double x, double y, double z)
static void
setSeed(long seed)
Set seed of random number generatorPoint3d
subtract(Point3d x)
double
theta()
java.lang.String
toString()
java.lang.String
toVRML()
double
x()
double
y()
double
z()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
v
public double[] v -
o
-
i
-
j
-
k
-
ijk
-
-
Constructor Details
-
Point3d
public Point3d() -
Point3d
public Point3d(double x, double y, double z)
-
-
Method Details
-
fromSpherical
-
fromCylindrical
-
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 classjava.lang.Object
-
fromString
- Throws:
java.lang.NumberFormatException
-
toVRML
public java.lang.String toVRML() -
add
-
subtract
-
scale
-
scale
-
dot
-
normalize
-
length
public double length() -
cross
-
setSeed
public static void setSeed(long seed)Set seed of random number generator -
random
Random in unit cube -
randomGaussian
Random Gaussian -
randomInSphere
Random in unit sphere -
randomInCircle
Random in unit circle -
randomOnSphere
Random on unit sphere -
randomOnCircle
Random on unit circle
-