jrobots.landscape
Enum TerrainType

java.lang.Object
  extended by java.lang.Enum<TerrainType>
      extended by jrobots.landscape.TerrainType
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<TerrainType>

public enum TerrainType
extends java.lang.Enum<TerrainType>


Enum Constant Summary
GRASS
          This terrain type is worse than ROAD and better than SAND to drive on.
OBSTACLE
          This terrain type is unpassable.
ROAD
          The central area of each track consists of this terrain type, paved road.
SAND
          This is the worst terrain type that a vehicle can actually drive through.
 
Method Summary
abstract  double getFrictionFactorFrontal()
          Friction factor applied to frontal friction
abstract  double getFrictionFactorLateral()
          Friction factor applied to lateral friction
static TerrainType valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static TerrainType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GRASS

public static final TerrainType GRASS
This terrain type is worse than ROAD and better than SAND to drive on.


OBSTACLE

public static final TerrainType OBSTACLE
This terrain type is unpassable. You usually only collide with its boundary, while actually driving on SAND.


ROAD

public static final TerrainType ROAD
The central area of each track consists of this terrain type, paved road. This is the "best" terrain type to be on.


SAND

public static final TerrainType SAND
This is the worst terrain type that a vehicle can actually drive through. It lies between GRASS and OBSTACLE types.

Method Detail

getFrictionFactorFrontal

public abstract double getFrictionFactorFrontal()
Friction factor applied to frontal friction

Returns:
friction factor [1;+inf[

getFrictionFactorLateral

public abstract double getFrictionFactorLateral()
Friction factor applied to lateral friction

Returns:
friction factor [1;+inf[

valueOf

public static TerrainType valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

values

public static TerrainType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (TerrainType c : TerrainType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared