Nebula
|
Particle context controls playing and enabling/disabling of particle emitters inside a model.
Classes | |
class | EmitterAttrs |
A container for particle emitter attributes. More... | |
class | EmitterMesh |
An emitter mesh holds positions and normals for particle emission. More... | |
class | EnvelopeCurve |
An Attack/Sustain/Release envelope curve class with optional sine/cosine modulation. More... | |
class | EnvelopeSampleBuffer |
A lookup table for pre-sampled envelope curves. More... | |
class | Particle |
The particle structure holds the current state of a single particle and common data for particle-job and nebula3 particle system. More... | |
class | ParticleContext |
struct | ParticleJobContext |
struct | ParticleJobSliceOutputData |
struct | ParticleJobUniformData |
Typedefs | |
typedef unsigned int | JOB_ID |
typedef Base::ParticleRenderInfoBase | ParticleRenderInfo |
Functions | |
__ImplementContext (ParticleContext, ParticleContext::particleContextAllocator) | |
void | JobStep (const ParticleJobUniformData *perSystemUniforms, const float stepTime, unsigned int numParticles, const Particle *particles_input, Particle *particles_output, ParticleJobSliceOutputData *sliceOutput) |
update particle system step | |
const float * | LookupEnvelopeSamples (const float sampleBuffer[ParticleSystemNumEnvelopeSamples *EmitterAttrs::NumEnvelopeAttrs], IndexT sampleIndex) |
NOTE: JobStepAndVlist does the same as JobStep, but it also generates the vertex list. | |
void | UpdateBbox (const vec4 &v, vec4 &min, vec4 &max) |
update bounding box (min, max) with vector v | |
void | ParticleUpdateAge (const float stepTime, const Particle &in, Particle &out) |
update the age of one particle | |
void | ParticleStep (const ParticleJobUniformData *perSystemUniforms, const float stepTime, const Particle &in, Particle &out, ParticleJobSliceOutputData *sliceOutput) |
integrate the particle state with a given time-step | |
typedef unsigned int Particles::JOB_ID |
typedef Base::ParticleRenderInfoBase Particles::ParticleRenderInfo |
Particles::__ImplementContext | ( | ParticleContext | , |
ParticleContext::particleContextAllocator | ) |
|
extern |
update particle system step
__forceinline const float * Particles::LookupEnvelopeSamples | ( | const float | sampleBuffer[ParticleSystemNumEnvelopeSamples *EmitterAttrs::NumEnvelopeAttrs], |
IndexT | sampleIndex ) |
NOTE: JobStepAndVlist does the same as JobStep, but it also generates the vertex list.
It could be in one function, but then we would always have to check a boolean value for each particle. Thats bad for the SPU, since it doesnt have any branch prediction, and it would have to throw away commands and fetch new commands from the program in each iteration lookup samples at index "sampleIndex" in sample-table
__forceinline void Particles::ParticleStep | ( | const ParticleJobUniformData * | perSystemUniforms, |
const float | stepTime, | ||
const Particle & | in, | ||
Particle & | out, | ||
ParticleJobSliceOutputData * | sliceOutput ) |
integrate the particle state with a given time-step
__forceinline void Particles::ParticleUpdateAge | ( | const float | stepTime, |
const Particle & | in, | ||
Particle & | out ) |
update the age of one particle
update bounding box (min, max) with vector v
Threading::AtomicCounter Particles::allSystemsCompleteCounter = 0 |
const Timing::Time Particles::DefaultStepTime = 1.0f / 60.0f |
CoreGraphics::BufferId Particles::geometryIbo |
CoreGraphics::BufferId Particles::geometryVbo |
CoreGraphics::VertexLayoutId Particles::layout |
Util::FixedArray<byte*> Particles::mappedVertices |
|
static |
SizeT Particles::numParticlesThisFrame |
Util::Array<CoreGraphics::VertexComponent> Particles::particleComponents |
const SizeT Particles::ParticleContextNumEnvelopeSamples = 192 |
|
static |
|
static |
|
static |
number of samples in envelope curves
CoreGraphics::PrimitiveGroup Particles::primGroup |
struct { ... } Particles::state |
Timing::Time Particles::StepTime = 1.0f / 60.0f |
Util::FixedArray<CoreGraphics::BufferId> Particles::vbos |
Util::FixedArray<SizeT> Particles::vboSizes |
byte* Particles::vertexPtr |
SizeT Particles::vertexSize |