|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--generator2.ExternalObjectClasses
Definition of the properties of the classes of external objects.
| Field Summary | |
protected int[] |
beginPortion
Portion of the classes at the beginning. |
protected java.awt.Color[] |
color
The colors. |
protected int[] |
decreasingFactor
Decreasing factors of the classes in per cent. |
protected DataSpace |
ds
The dataspace. |
protected int[] |
extension
Extension of the classes in per cent of the data space *100. |
protected int[] |
lifetime
Lifetime of the classes. |
protected int |
num
The number of classes. |
protected int[] |
portion
Portion of the classes. |
protected int |
PORTIONSUM
Sum of all portions. |
protected java.util.Properties |
properties
The properties of the generator. |
protected java.util.Random |
random
Random generator |
protected Time |
time
The time object. |
| Constructor Summary | |
ExternalObjectClasses(java.util.Properties properties,
Time time,
DataSpace ds,
int numOfClasses)
ObjectClasses constructor. |
|
| Method Summary | |
int |
computeNewExternalObjectClass(int time)
Computes the object class of a new external object. |
java.awt.Color |
getColor(int c)
Returns the color of the class. |
int |
getDecreasingFactor(int c)
Returns the factor of the class for the decrease of speed. |
int |
getExtension(int c,
int dim)
Returns the (maximum) extension of the class. |
int |
getLifetime(int c)
Returns the (maximum) life time of the class. |
int |
getNumber()
Returns the number of object classes. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.util.Properties properties
protected Time time
protected DataSpace ds
protected int num
protected int[] lifetime
protected int[] extension
protected int[] decreasingFactor
protected final int PORTIONSUM
protected int[] portion
protected int[] beginPortion
protected java.awt.Color[] color
protected java.util.Random random
| Constructor Detail |
public ExternalObjectClasses(java.util.Properties properties,
Time time,
DataSpace ds,
int numOfClasses)
properties - properties of the generatortime - the time objectds - data spacenumOfClasses - number of object classes| Method Detail |
public int computeNewExternalObjectClass(int time)
time - time stamp
public java.awt.Color getColor(int c)
c - object class
public int getDecreasingFactor(int c)
c - object class
public int getExtension(int c,
int dim)
c - object classdim - dimension (0 = x, 1 = y)
public int getLifetime(int c)
c - object class
public int getNumber()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||