Revision 4:ab6db404403a CollidoscopeApp/include
| CollidoscopeApp/include/ParticleController.h | ||
|---|---|---|
| 10 | 10 |
|
| 11 | 11 |
struct Particle {
|
| 12 | 12 |
|
| 13 |
ci::vec2 mCloudCenter; |
|
| 14 |
ci::vec2 mVel; |
|
| 15 |
float mCloudSize; |
|
| 13 |
ci::vec2 mCloudCenter; // initial positin of the particle |
|
| 14 |
ci::vec2 mVel; // velocity |
|
| 15 |
float mCloudSize; // how big is the area where particle float around. When a particle hits the |
|
| 16 |
// border of the area it gets deflected |
|
| 16 | 17 |
|
| 17 |
int mAge; |
|
| 18 |
int mLifespan; |
|
| 19 |
bool mFlyOver; |
|
| 18 |
int mAge; // when mAge == mLifeSpan the particle is disposed
|
|
| 19 |
int mLifespan; // how long a particle lives
|
|
| 20 |
bool mFlyOver; // some particles last longer and fly over the screen and reach the other user
|
|
| 20 | 21 |
|
| 21 | 22 |
}; |
| 22 | 23 |
|
| ... | ... | |
| 28 | 29 |
// current number of active particles |
| 29 | 30 |
size_t mNumParticles; |
| 30 | 31 |
|
| 31 |
ci::gl::VboRef mParticleVbo; |
|
| 32 |
ci::gl::VboRef mParticleVbo; // virtual buffer object
|
|
| 32 | 33 |
ci::gl::BatchRef mParticleBatch; |
| 33 | 34 |
|
| 34 | 35 |
public: |
Also available in: Unified diff