public void destroyParticlesFillShape(FluidFixtureShape shape)
 {
     for (int i = 0; i < count; i++)
     {
         if (shape.testPoint(particleBuffer [i].position))
         {
             destroyParticle(particleBuffer [i], true);
         }
     }
 }
        public List <FluidParticle> getParticlesInShape(FluidFixtureShape shape)
        {
            List <FluidParticle> fp = new List <FluidParticle> ();

            for (int i = 0; i < count; i++)
            {
                if (shape.testPoint(particleBuffer [i].position))
                {
                    fp.Add(particleBuffer[i]);
                }
            }
            return(fp);
        }
        public void createParticlesFillShapeForGroup(FluidFixtureShape shape, FluidParticleDef def)
        {
            float     stride = getParticleStride();
            FluidAABB aabb   = shape.getAABB();

//			Color c = def.color;
            for (float y = Mathf.Floor(aabb.lowerBound.y / stride) * stride; y < aabb.upperBound.y; y += stride)
            {
                for (float x = Mathf.Floor(aabb.lowerBound.x / stride) * stride; x < aabb.upperBound.x; x += stride)
                {
                    Vector2 p = new Vector2(x, y);
                    if (shape.testPoint(p))
                    {
                        def.position = p;
//						def.color = new Color(Random.Range(0,2),Random.Range(0,2),Random.Range(0,2));
                        createParticle(def);
                    }
                }
            }
//			def.color = c;
        }