org.wilmascope.global
Class RandomGenerator
java.lang.Object
org.wilmascope.global.RandomGenerator
public class RandomGenerator
- extends java.lang.Object
Random vector generator
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RandomGenerator
public RandomGenerator()
getRandom
public static java.util.Random getRandom()
getRandomFloat
public static float getRandomFloat()
getVector3f
public static javax.vecmath.Vector3f getVector3f()
- Returns:
- A random Vector3f scaled by
Constant: DefaultRandomVectorLength
getPoint3f
public static javax.vecmath.Point3f getPoint3f()
getVector3f
public static javax.vecmath.Vector3f getVector3f(float length)
- Returns:
- a random unit vector scaled by length
randomPoint
public static javax.vecmath.Point3f randomPoint(boolean threeD)
- Parameters:
threeD
- if this is false then z values are all 0
- Returns:
- a random point with x,y,z values between 0 and 1
randomColour
public static java.awt.Color randomColour()
- Returns:
- a random colour