| 1 |
#ifndef _CRANDOMVELEVENT_ |
| 2 |
#define _CRANDOMVELEVENT_ |
| 3 |
|
| 4 |
#include "CParticle.h" |
| 5 |
#include "CTimedEvent.h" |
| 6 |
|
| 7 |
class CRandomVelEvent : public CTimedEvent |
| 8 |
{ |
| 9 |
public: |
| 10 |
CRandomVelEvent(CParticle &p, double prob, int period, double changeX, double changeY, bool c) |
| 11 |
: CTimedEvent(period, c), p(p), prob(prob), changeX(changeX), changeY(changeY) { } |
| 12 |
|
| 13 |
void doUpdate(); |
| 14 |
|
| 15 |
CRandomVelEvent* getCopy() { return new CRandomVelEvent(*this); } |
| 16 |
|
| 17 |
private: |
| 18 |
double prob; |
| 19 |
double changeX, changeY; |
| 20 |
CParticle &p; |
| 21 |
}; |
| 22 |
|
| 23 |
#endif |