CParticle2
struct · models · 32 bytes
- Meaning
- Holds one particle: position, gradient byte, velocity and age
- Confidence
- verified, proof one
- Finding
- models/particles#particle-life
Finding: Particle life in models: particles
A step first lets an enabled emitter or one with a pending burst reserve storage, then spawns. Each
live particle then ages by dt and dies once its age reaches the lifespan, a NaN age included.
A survivor takes gradient 1 once its age is past mid·lifespan, else gradient 0, and moves
(Particle motion); a move that returns 0 kills it. A dead particle's slot returns to the free
list and the last live index takes its place in the live list.
The derivation is in the doc.
Fields 4
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 12 | float[3] | m_position | Holds the position, in world or emitter space | verified, proof one | models/particles#particle-life |
0x000c | 1 | uint8_t | m_gradient | Holds which gradient colours the particle, 1 past the midpoint | verified, proof one | models/particles#particle-life |
0x0010 | 12 | float[3] | m_velocity | Holds the velocity | verified, proof one | models/emission#spawn-space |
0x001c | 4 | float | m_age | Holds the age in seconds | verified, proof one | models/particles#particle-life |