Beispiel #1
0
        protected override void emitParticles(int particleCount, ReceiverHandler particleReceiver)
        {
            SSParticle newParticle = new SSParticle();

            ParticlesFieldGenerator.NewParticleDelegate fieldReceiver = (id, pos) => {
                configureNewParticle(newParticle);
                newParticle.pos = pos;
                particleReceiver(newParticle);
                return(true);
            };
            m_fieldGenerator.Generate(particleCount, fieldReceiver);
        }
Beispiel #2
0
        public void Generate(int numParticles, NewBodyDelegate newBodyDel)
        {
            m_bodiesSoFar = new SSSphereBVH();
            m_newBodyDel  = newBodyDel;
            m_id          = 0;

            m_partFieldGen.Generate(numParticles, onNewParticle);

            // Prepare the garbage
            m_rand        = null;
            m_newBodyDel  = null;
            m_bodiesSoFar = null;
        }