/** * Destroy particles inside a shape without enabling the destruction callback for destroyed * particles. This function is locked during callbacks. For more information see * DestroyParticleInShape(Shape&, Transform&,bool). * * @param Shape which encloses particles that should be destroyed. * @param Transform applied to the shape. * @warning This function is locked during callbacks. * @return Number of particles destroyed. */ public int destroyParticlesInShape(Shape shape, Transform xf) { return destroyParticlesInShape(shape, xf, false); }
/** * Destroy particles inside a shape without enabling the destruction callback for destroyed * particles. This function is locked during callbacks. For more information see * DestroyParticleInShape(Shape&, Transform&,bool). * * @param Shape which encloses particles that should be destroyed. * @param Transform applied to the shape. * @warning This function is locked during callbacks. * @return Number of particles destroyed. */ public int destroyParticlesInShape(Shape shape, Transform xf) { return destroyParticlesInShape(shape, xf, false); }
@Override public void mouseDrag(Vec2 p, int button) { super.mouseDrag(p, button); if (m_drawing) { pshape.m_p.set(p); pshape.m_radius = 2.0f; pxf.setIdentity(); m_world.destroyParticlesInShape(pshape, pxf); ppd.shape = pshape; ppd.color = color; ppd.flags = m_particleFlags; ppd.groupFlags = m_groupFlags; ParticleGroup group = m_world.createParticleGroup(ppd); if (m_lastGroup != null && group.getGroupFlags() == m_lastGroup.getGroupFlags()) { m_world.joinParticleGroups(m_lastGroup, group); } else { m_lastGroup = group; } mouseTracing = false; } }
/** * Destroy particles inside a shape without enabling the destruction callback for destroyed * particles. This function is locked during callbacks. For more information see * DestroyParticleInShape(Shape&, Transform&,bool). * * @param Shape which encloses particles that should be destroyed. * @param Transform applied to the shape. * @warning This function is locked during callbacks. * @return Number of particles destroyed. */ public int destroyParticlesInShape(Shape shape, Transform xf) { return destroyParticlesInShape(shape, xf, false); }
/** * Destroy particles inside a shape without enabling the destruction callback for destroyed * particles. This function is locked during callbacks. For more information see * DestroyParticleInShape(Shape&, Transform&,bool). * This function is locked during callbacks. * * @param shape which encloses particles that should be destroyed. * @param xf transform applied to the shape. * @return Number of particles destroyed. */ public int destroyParticlesInShape(Shape shape, Transform xf) { return destroyParticlesInShape(shape, xf, false); }