#include <RandomMotionGenerator.h>
Collaboration diagram for RandomMotionGenerator:
Public Member Functions | |
RandomMotionGenerator (double minValue, double maxValue, double valueDx, double directionDx, ChangeType changeType, unsigned long n) | |
Constructor. | |
PfVec | getMotionVector () |
Returns a random motion vector. | |
Private Member Functions | |
double | computeDirection (double previousDirection) const |
Returns a direction. | |
double | computeVecLength (double previousLength) const |
Returns a length. | |
double | getRandomNumberBetween (double min, double max) const |
Returns a random number between two numbers. | |
Private Attributes | |
double | minValue |
The minimum length of the random vector. | |
double | maxValue |
The maximum length of the random vector. | |
double | valueDx |
The maximum difference of the length of two successively generated vector. | |
double | directionDx |
The maximum difference of the direction of two successively generated vector. | |
ChangeType | changeType |
The unit of n. | |
unsigned long | n |
The number of steps to wait until a new vector is generated. | |
PfVec | lastVec |
The last generated vector. | |
double | lastDirection |
The last generated direction. | |
unsigned long | calls |
The number of calls since the last vector was generated. | |
unsigned long | pointOfGenerationTime |
The point of time the last vector was generated. |
Definition at line 22 of file RandomMotionGenerator.h.
|
Constructor.
Definition at line 16 of file RandomMotionGenerator.cpp. References ChangeType, getSystemTime(), and pi. |
Here is the call graph for this function:
|
Returns a random motion vector.
Definition at line 36 of file RandomMotionGenerator.cpp. References CALLS, calls, computeDirection(), computeVecLength(), getSystemTime(), lastDirection, lastVec, PfVec::length(), MILLISECONDS, pointOfGenerationTime, and PfVec::rotate(). Referenced by Motionfield::getRandomVector(). |
Here is the call graph for this function:
|
Returns a direction.
Definition at line 61 of file RandomMotionGenerator.cpp. References getRandomNumberBetween(), pi, and pi2. Referenced by getMotionVector(). |
Here is the call graph for this function:
|
Returns a length.
Definition at line 72 of file RandomMotionGenerator.cpp. References getRandomNumberBetween(). Referenced by getMotionVector(). |
Here is the call graph for this function:
|
Returns a random number between two numbers.
Definition at line 89 of file RandomMotionGenerator.cpp. Referenced by computeDirection(), and computeVecLength(). |
|
The minimum length of the random vector.
Definition at line 43 of file RandomMotionGenerator.h. |
|
The maximum length of the random vector.
Definition at line 45 of file RandomMotionGenerator.h. |
|
The maximum difference of the length of two successively generated vector.
Definition at line 47 of file RandomMotionGenerator.h. |
|
The maximum difference of the direction of two successively generated vector.
Definition at line 49 of file RandomMotionGenerator.h. |
|
The unit of n.
Definition at line 51 of file RandomMotionGenerator.h. |
|
The number of steps to wait until a new vector is generated.
Definition at line 53 of file RandomMotionGenerator.h. |
|
The last generated vector.
Definition at line 55 of file RandomMotionGenerator.h. Referenced by getMotionVector(). |
|
The last generated direction.
Definition at line 57 of file RandomMotionGenerator.h. Referenced by getMotionVector(). |
|
The number of calls since the last vector was generated.
Definition at line 59 of file RandomMotionGenerator.h. Referenced by getMotionVector(). |
|
The point of time the last vector was generated.
Definition at line 61 of file RandomMotionGenerator.h. Referenced by getMotionVector(). |