org.wilmascope.global
Class RandomGenerator

java.lang.Object
  extended by org.wilmascope.global.RandomGenerator

public class RandomGenerator
extends java.lang.Object

Random vector generator


Constructor Summary
RandomGenerator()
           
 
Method Summary
static javax.vecmath.Point3f getPoint3f()
           
static java.util.Random getRandom()
           
static float getRandomFloat()
           
static javax.vecmath.Vector3f getVector3f()
           
static javax.vecmath.Vector3f getVector3f(float length)
           
static java.awt.Color randomColour()
           
static javax.vecmath.Point3f randomPoint(boolean threeD)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomGenerator

public RandomGenerator()
Method Detail

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