igeo
Class IRand

java.lang.Object
  extended by igeo.IRand
Direct Known Subclasses:
IRandom

public class IRand
extends java.lang.Object

A class to provide random number function.


Field Summary
static long defaultSeed
           
protected static java.util.Random random
           
 
Constructor Summary
IRand()
           
 
Method Summary
static java.awt.Color clr()
           
static java.awt.Color clr(float alpha)
           
static java.awt.Color clr(float maxRed, float maxGreen, float maxBlue)
           
static java.awt.Color clr(float maxRed, float maxGreen, float maxBlue, float alpha)
           
static java.awt.Color clr(float minRed, float maxRed, float minGreen, float maxGreen, float minBlue, float maxBlue, float alpha)
           
static java.awt.Color clr(float minRed, float maxRed, float minGreen, float maxGreen, float minBlue, float maxBlue, float minAlpha, float maxAlpha)
           
static java.awt.Color clr(int alpha)
           
static java.awt.Color clr(int maxRed, int maxGreen, int maxBlue)
           
static java.awt.Color clr(int maxRed, int maxGreen, int maxBlue, int alpha)
           
static java.awt.Color clr(int minRed, int maxRed, int minGreen, int maxGreen, int minBlue, int maxBlue, int alpha)
           
static java.awt.Color clr(int minRed, int maxRed, int minGreen, int maxGreen, int minBlue, int maxBlue, int minAlpha, int maxAlpha)
           
static IVec dir()
          random direction in 3D
static IVec dir(double length)
           
static IVec dir(IVecI perpendicularAxis)
           
static IVec dir(IVecI perpendicularAxis, double length)
           
static IVec dir2()
          random direction on XY plane
static IVec dir2(double length)
           
static IVec direction()
           
static IVec direction(double length)
           
static IVec direction(IVecI perpendicularAxis)
           
static IVec direction(IVecI perpendicularAxis, double length)
           
static IVec direction2()
           
static IVec direction2(double length)
           
static double get()
           
static double get(double max)
           
static double get(double min, double max)
           
static java.awt.Color getColor()
           
static java.awt.Color getColor(float alpha)
           
static java.awt.Color getColor(float maxRed, float maxGreen, float maxBlue)
           
static java.awt.Color getColor(float maxRed, float maxGreen, float maxBlue, float alpha)
           
static java.awt.Color getColor(float minRed, float maxRed, float minGreen, float maxGreen, float minBlue, float maxBlue, float alpha)
           
static java.awt.Color getColor(float minRed, float maxRed, float minGreen, float maxGreen, float minBlue, float maxBlue, float minAlpha, float maxAlpha)
           
static java.awt.Color getColor(int alpha)
           
static java.awt.Color getColor(int maxRed, int maxGreen, int maxBlue)
           
static java.awt.Color getColor(int maxRed, int maxGreen, int maxBlue, int alpha)
           
static java.awt.Color getColor(int minRed, int maxRed, int minGreen, int maxGreen, int minBlue, int maxBlue, int alpha)
           
static java.awt.Color getColor(int minRed, int maxRed, int minGreen, int maxGreen, int minBlue, int maxBlue, int minAlpha, int maxAlpha)
           
static IVec getDirection()
           
static IVec getDirection(double length)
           
static IVec getDirection(IVecI perpendicularAxis)
           
static IVec getDirection(IVecI perpendicularAxis, double length)
           
static IVec getDirection2()
           
static IVec getDirection2(double length)
           
static double getDouble()
           
static double getDouble(double max)
           
static double getDouble(double min, double max)
           
static float getf()
           
static float getf(float max)
           
static float getf(float min, float max)
           
static float getFloat()
           
static float getFloat(float max)
           
static float getFloat(float min, float max)
           
static java.awt.Color getGray()
           
static java.awt.Color getGray(float alpha)
           
static java.awt.Color getGray(float minGray, float maxGray)
           
static java.awt.Color getGray(float minGray, float maxGray, float alpha)
           
static java.awt.Color getGray(float minGray, float maxGray, float minAlpha, float maxAlpha)
           
static java.awt.Color getGray(int alpha)
           
static java.awt.Color getGrayColor()
           
static java.awt.Color getGrayColor(float alpha)
           
static java.awt.Color getGrayColor(float minGray, float maxGray)
           
static java.awt.Color getGrayColor(float minGray, float maxGray, float alpha)
           
static java.awt.Color getGrayColor(float minGray, float maxGray, float minAlpha, float maxAlpha)
           
static java.awt.Color getGrayColor(int alpha)
           
static int geti()
          returns 0 or 1
static int geti(int max)
           
static int geti(int min, int max)
           
static int getInt()
           
static int getInt(int max)
           
static int getInt(int min, int max)
           
static int getInteger()
           
static int getInteger(int max)
           
static int getInteger(int min, int max)
           
static boolean getPercent(double percent)
           
static IVec getPoint()
           
static IVec getPoint(double max)
           
static IVec getPoint(double min, double max)
           
static IVec getPoint(double maxx, double maxy, double maxz)
           
static IVec getPoint(double minx, double miny, double minz, double maxx, double maxy, double maxz)
           
static IVec getPoint(IVec max)
           
static IVec getPoint(IVec min, IVec max)
           
static IVec getPoint2()
           
static IVec getPoint2(double max)
           
static IVec getPoint2(double min, double max)
           
static IVec getPoint2(double minx, double miny, double maxx, double maxy)
           
static java.awt.Color gray()
           
static java.awt.Color gray(float alpha)
           
static java.awt.Color gray(float minGray, float maxGray)
           
static java.awt.Color gray(float minGray, float maxGray, float alpha)
           
static java.awt.Color gray(float minGray, float maxGray, float minAlpha, float maxAlpha)
           
static java.awt.Color gray(int alpha)
           
static void init()
           
static void init(long seed)
           
static void initByTime()
           
static boolean pct(double percent)
           
static boolean percent(double percent)
           
static IVec point()
           
static IVec point(double max)
           
static IVec point(double min, double max)
           
static IVec point(double maxx, double maxy, double maxz)
           
static IVec point(double minx, double miny, double minz, double maxx, double maxy, double maxz)
           
static IVec point(IVec max)
           
static IVec point(IVec min, IVec max)
           
static IVec point2()
           
static IVec point2(double max)
           
static IVec point2(double min, double max)
           
static IVec point2(double minx, double miny, double maxx, double maxy)
           
static IVec pt()
           
static IVec pt(double max)
           
static IVec pt(double min, double max)
           
static IVec pt(double maxx, double maxy, double maxz)
           
static IVec pt(double minx, double miny, double minz, double maxx, double maxy, double maxz)
           
static IVec pt(IVec max)
           
static IVec pt(IVec min, IVec max)
           
static IVec pt2()
           
static IVec pt2(double max)
           
static IVec pt2(double min, double max)
           
static IVec pt2(double minx, double miny, double maxx, double maxy)
          random point on XY plane
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

defaultSeed

public static final long defaultSeed
See Also:
Constant Field Values

random

protected static java.util.Random random
Constructor Detail

IRand

public IRand()
Method Detail

init

public static void init()

init

public static void init(long seed)

initByTime

public static void initByTime()

get

public static double get()

getDouble

public static double getDouble(double min,
                               double max)

getDouble

public static double getDouble(double max)

getDouble

public static double getDouble()

get

public static double get(double min,
                         double max)

get

public static double get(double max)

getf

public static float getf()

getf

public static float getf(float min,
                         float max)

getf

public static float getf(float max)

getFloat

public static float getFloat()

getFloat

public static float getFloat(float min,
                             float max)

getFloat

public static float getFloat(float max)

geti

public static int geti(int min,
                       int max)

geti

public static int geti(int max)

geti

public static int geti()
returns 0 or 1


getInt

public static int getInt(int min,
                         int max)

getInt

public static int getInt(int max)

getInt

public static int getInt()

getInteger

public static int getInteger(int min,
                             int max)

getInteger

public static int getInteger(int max)

getInteger

public static int getInteger()

pt

public static IVec pt(IVec min,
                      IVec max)

point

public static IVec point(IVec min,
                         IVec max)

getPoint

public static IVec getPoint(IVec min,
                            IVec max)

pt

public static IVec pt(IVec max)

point

public static IVec point(IVec max)

getPoint

public static IVec getPoint(IVec max)

pt

public static IVec pt(double minx,
                      double miny,
                      double minz,
                      double maxx,
                      double maxy,
                      double maxz)

pt

public static IVec pt(double maxx,
                      double maxy,
                      double maxz)

pt

public static IVec pt(double min,
                      double max)

pt

public static IVec pt(double max)

pt

public static IVec pt()

point

public static IVec point(double minx,
                         double miny,
                         double minz,
                         double maxx,
                         double maxy,
                         double maxz)

point

public static IVec point(double maxx,
                         double maxy,
                         double maxz)

point

public static IVec point(double min,
                         double max)

point

public static IVec point(double max)

point

public static IVec point()

getPoint

public static IVec getPoint(double minx,
                            double miny,
                            double minz,
                            double maxx,
                            double maxy,
                            double maxz)

getPoint

public static IVec getPoint(double maxx,
                            double maxy,
                            double maxz)

getPoint

public static IVec getPoint(double min,
                            double max)

getPoint

public static IVec getPoint(double max)

getPoint

public static IVec getPoint()

pt2

public static IVec pt2(double minx,
                       double miny,
                       double maxx,
                       double maxy)
random point on XY plane


pt2

public static IVec pt2(double min,
                       double max)

pt2

public static IVec pt2(double max)

pt2

public static IVec pt2()

point2

public static IVec point2(double minx,
                          double miny,
                          double maxx,
                          double maxy)

point2

public static IVec point2(double min,
                          double max)

point2

public static IVec point2(double max)

point2

public static IVec point2()

getPoint2

public static IVec getPoint2(double minx,
                             double miny,
                             double maxx,
                             double maxy)

getPoint2

public static IVec getPoint2(double min,
                             double max)

getPoint2

public static IVec getPoint2(double max)

getPoint2

public static IVec getPoint2()

dir

public static IVec dir()
random direction in 3D


dir

public static IVec dir(double length)

dir

public static IVec dir(IVecI perpendicularAxis)

dir

public static IVec dir(IVecI perpendicularAxis,
                       double length)

direction

public static IVec direction()

direction

public static IVec direction(double length)

direction

public static IVec direction(IVecI perpendicularAxis)

direction

public static IVec direction(IVecI perpendicularAxis,
                             double length)

getDirection

public static IVec getDirection()

getDirection

public static IVec getDirection(double length)

getDirection

public static IVec getDirection(IVecI perpendicularAxis)

getDirection

public static IVec getDirection(IVecI perpendicularAxis,
                                double length)

dir2

public static IVec dir2()
random direction on XY plane


dir2

public static IVec dir2(double length)

direction2

public static IVec direction2()

direction2

public static IVec direction2(double length)

getDirection2

public static IVec getDirection2()

getDirection2

public static IVec getDirection2(double length)

getPercent

public static boolean getPercent(double percent)

percent

public static boolean percent(double percent)

pct

public static boolean pct(double percent)

getColor

public static java.awt.Color getColor()

clr

public static java.awt.Color clr()

getColor

public static java.awt.Color getColor(int alpha)

clr

public static java.awt.Color clr(int alpha)

getColor

public static java.awt.Color getColor(int minRed,
                                      int maxRed,
                                      int minGreen,
                                      int maxGreen,
                                      int minBlue,
                                      int maxBlue,
                                      int minAlpha,
                                      int maxAlpha)

clr

public static java.awt.Color clr(int minRed,
                                 int maxRed,
                                 int minGreen,
                                 int maxGreen,
                                 int minBlue,
                                 int maxBlue,
                                 int minAlpha,
                                 int maxAlpha)

getColor

public static java.awt.Color getColor(int minRed,
                                      int maxRed,
                                      int minGreen,
                                      int maxGreen,
                                      int minBlue,
                                      int maxBlue,
                                      int alpha)

clr

public static java.awt.Color clr(int minRed,
                                 int maxRed,
                                 int minGreen,
                                 int maxGreen,
                                 int minBlue,
                                 int maxBlue,
                                 int alpha)

getColor

public static java.awt.Color getColor(int maxRed,
                                      int maxGreen,
                                      int maxBlue,
                                      int alpha)

clr

public static java.awt.Color clr(int maxRed,
                                 int maxGreen,
                                 int maxBlue,
                                 int alpha)

getColor

public static java.awt.Color getColor(int maxRed,
                                      int maxGreen,
                                      int maxBlue)

clr

public static java.awt.Color clr(int maxRed,
                                 int maxGreen,
                                 int maxBlue)

getColor

public static java.awt.Color getColor(float alpha)

clr

public static java.awt.Color clr(float alpha)

getColor

public static java.awt.Color getColor(float minRed,
                                      float maxRed,
                                      float minGreen,
                                      float maxGreen,
                                      float minBlue,
                                      float maxBlue,
                                      float minAlpha,
                                      float maxAlpha)

clr

public static java.awt.Color clr(float minRed,
                                 float maxRed,
                                 float minGreen,
                                 float maxGreen,
                                 float minBlue,
                                 float maxBlue,
                                 float minAlpha,
                                 float maxAlpha)

getColor

public static java.awt.Color getColor(float minRed,
                                      float maxRed,
                                      float minGreen,
                                      float maxGreen,
                                      float minBlue,
                                      float maxBlue,
                                      float alpha)

clr

public static java.awt.Color clr(float minRed,
                                 float maxRed,
                                 float minGreen,
                                 float maxGreen,
                                 float minBlue,
                                 float maxBlue,
                                 float alpha)

getColor

public static java.awt.Color getColor(float maxRed,
                                      float maxGreen,
                                      float maxBlue,
                                      float alpha)

clr

public static java.awt.Color clr(float maxRed,
                                 float maxGreen,
                                 float maxBlue,
                                 float alpha)

getColor

public static java.awt.Color getColor(float maxRed,
                                      float maxGreen,
                                      float maxBlue)

clr

public static java.awt.Color clr(float maxRed,
                                 float maxGreen,
                                 float maxBlue)

getGrayColor

public static java.awt.Color getGrayColor()

getGray

public static java.awt.Color getGray()

gray

public static java.awt.Color gray()

getGrayColor

public static java.awt.Color getGrayColor(int alpha)

getGray

public static java.awt.Color getGray(int alpha)

gray

public static java.awt.Color gray(int alpha)

getGrayColor

public static java.awt.Color getGrayColor(float alpha)

getGray

public static java.awt.Color getGray(float alpha)

gray

public static java.awt.Color gray(float alpha)

getGrayColor

public static java.awt.Color getGrayColor(float minGray,
                                          float maxGray,
                                          float minAlpha,
                                          float maxAlpha)

getGray

public static java.awt.Color getGray(float minGray,
                                     float maxGray,
                                     float minAlpha,
                                     float maxAlpha)

gray

public static java.awt.Color gray(float minGray,
                                  float maxGray,
                                  float minAlpha,
                                  float maxAlpha)

getGrayColor

public static java.awt.Color getGrayColor(float minGray,
                                          float maxGray,
                                          float alpha)

getGray

public static java.awt.Color getGray(float minGray,
                                     float maxGray,
                                     float alpha)

gray

public static java.awt.Color gray(float minGray,
                                  float maxGray,
                                  float alpha)

getGrayColor

public static java.awt.Color getGrayColor(float minGray,
                                          float maxGray)

getGray

public static java.awt.Color getGray(float minGray,
                                     float maxGray)

gray

public static java.awt.Color gray(float minGray,
                                  float maxGray)