needUpdateVerts = true;
    public void update(float secondsPassed) {        if (isActive()) {            secondsPassed *= getSpeed();            currentTime += secondsPassed;            timePassed = currentTime - prevTime;            if (timePassed < precision)                return;            prevTime = currentTime;            // Update the current rotation matrix if needed.            updateRotationMatrix();            if (currentTime >= getMinTime() && currentTime <= getMaxTime()) {                if (controlFlow) {                    if (currentTime - releaseTime > 1.0f) {                        released = 0;                        releaseTime = currentTime;                    }                    particlesToCreate = (int) ((float) releaseRate * timePassed * (1.0f + releaseVariance                            * (FastMath.nextRandomFloat() - 0.5f)));                    if (particlesToCreate <= 0)                        particlesToCreate = 1;                    if (releaseRate - released <= 0)                        particlesToCreate = 0;                }                invScale.set(particlesGeometry.getLocalScale());                invScale.set(1f / invScale.x, 1f / invScale.y, 1f / invScale.z);                int i = 0;                boolean dead = true;                needUpdateVerts = true;                while (i < noParticles) {                    if (particles[i].updateAndCheck(timePassed)                            && (!controlFlow || particlesToCreate > 0)) {                        if (particles[i].status == Particle.DEAD                                && getRepeatType() == RT_CLAMP) {                            ;                        } else {                            dead = false;                            if (controlFlow) {                                released++;                                particlesToCreate--;                            }                            getRandomSpeed(particleSpeed);                            particles[i].recreateParticle(particleSpeed,                                    getRandomLifeSpan());                            particles[i].status = Particle.ALIVE;                            switch (getGeometry()) {                            case GS_LINE:                                particles[i].location.set(getLine().random());                                break;                            case GS_RECTANGLE:                                particles[i].location.set(getRectangle()                                        .random());                                break;                            case GS_MESH:                                particles[i].location.set(getGeoMesh()                                        .randomVertice());                                break;                            case GS_POINT:                            default:                                particles[i].location.set(originCenter);                                break;                            }                            particles[i].location.multLocal(invScale);                        }                    } else                        dead = false;                    i++;                }                particlesGeometry.setVertices(geometryCoordinates);                particlesGeometry.setColors(appearanceColors);                if (dead)                    setActive(false);            }            if (particlesGeometry.getModelBound() != null) {                particlesGeometry.getModelBound().computeFromPoints(                        particlesGeometry.getVertices());            }        }    }