java.lang.Object
org.bzdev.roadanim.RoadAnimation
Package configuration class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
setTraceLevels
(int level1, int level2, int level3, int level4) Set trace levels explicitly.static <T extends Enum<T>>
voidsetTraceLevels
(T level1, T level2, T level3, T level4) Set trace levels using enumerations.
-
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:- For level1, methods that change slowly varying parameters
may be traced. For Car, this includes the following
methods:
-
Car.setSkidMode(boolean)
-
Car.setReverseMode(boolean)
-
Car.setPathImplementation(org.bzdev.geom.BasicSplinePath2D,double,double,boolean,double)
(which is called by the setPath methods of DirectedObject2D)
-
- 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. Remember that the Runge-Kutta function is called multiple times for each step.
- Parameters:
level1
- the trace level for slowly-varying parameterslevel2
- the trace level for bursty parameterslevel3
- the trace level for updateslevel4
- the trace level for use Runge-Kutta function calls- Throws:
IllegalArgumentException
- an argument was smaller than -1
- For level1, methods that change slowly varying parameters
may be traced. For Car, this includes the following
methods:
-
setTraceLevels
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 parameterslevel2
- the trace level for bursty parameterslevel3
- the trace level for updateslevel4
- the trace level for Runge-Kutta function calls
-