Class RoadAnimation

java.lang.Object
org.bzdev.roadanim.RoadAnimation

public class RoadAnimation extends Object
Package configuration class.
  • Constructor Details

    • RoadAnimation

      public RoadAnimation()
  • Method Details

    • setTraceLevels

      public static void setTraceLevels(int level1, int level2, int level3, int level4) throws IllegalArgumentException
      Set trace levels explicitly. A level of -1 indicates that nothing will be displayed. Otherwise the level must be a non-negative integer. For the models in the org.bzdev.roadanim package, the levels are used as follows:
      Parameters:
      level1 - the trace level for slowly-varying parameters
      level2 - the trace level for bursty parameters
      level3 - the trace level for updates
      level4 - the trace level for use Runge-Kutta function calls
      Throws:
      IllegalArgumentException - an argument was smaller than -1
    • setTraceLevels

      public static <T extends Enum<T>> void setTraceLevels(T level1, T level2, T level3, T level4)
      Set trace levels using enumerations. A level set to null indicates that nothing will be displayed. Otherwise the level must be an enumeration constant, with the constant's ordinal value providing the level.
      • For level1, methods that change slowly varying parameters may be traced. For Car, this includes the following methods: For Bicycle, this includes the following methods:
      • For level2, methods that may change either slowly or in bursts (given the typical usage of these classes) may be traced. The only method is Bicycle.setHelmetAngle(double).
      • For level3, The angle returned by the angle function handling the no-skid case for the Car class is traced.
      • For level4, The function used by the Runge-Kutta algorithm to compute the derivative of the angle φ for the Car class; is traced. Angles, including the returned rate of change, are given in units of degrees per second.
      Type Parameters:
      T - the enumeration used to define trace levels
      Parameters:
      level1 - the trace level for slowly-varying parameters
      level2 - the trace level for bursty parameters
      level3 - the trace level for updates
      level4 - the trace level for Runge-Kutta function calls