private static ParticleContainer SplatEnumToInstance(SplatImplementation implementation) { ParticleContainer particleContainer; switch (implementation) { case SPLAT_GPU: { particleContainer = new GPUParticleContainer(); } break; case SPLAT_CPU: { particleContainer = new CPUParticleContainer(); } break; case SPLAT_CPU_DIRECT: { throw new NotImplementedException(); } default: { throw new NotImplementedException(); } } return(particleContainer); }
public void SetSplatImplementation(SplatImplementation implementation) { if (implementation == _splatImplementationChoice) { return; } _particleContainer = SplatEnumToInstance(_splatImplementationChoice); _particleContainer.Initialise(_numParticles, _waveParticleKillThreshold); }