rot.multLocal(v2); float tStr = (random ? FastMath.nextRandomFloat() * strength : strength); p.getVelocity().addLocal(v2.x * tStr * dt, v2.y * tStr * dt, v2.z * tStr * dt);
if (type == VT_CYLINDER) { rot.multLocal(v2); p.getVelocity().scaleAdd(dtStr, v2, p.getVelocity()); return; } v2.cross(line.getDirection(), v1); v1.multLocal(radius); v1.scaleAdd(height, line.getDirection(), v1); v1.addLocal(line.getOrigin()); v1.subtractLocal(p.getPosition()); if (v1.length() == 0) { return; } v1.normalizeLocal(); v1.cross(v2, v3); rot.fromAngleAxis(-divergence, v2); rot.multLocal(v3); p.getVelocity().scaleAdd(dtStr, v3, p.getVelocity());
        public void apply(float dt, Particle p) {            p.getPosition().subtract(line.getOrigin(), v1);            line.getDirection().cross(v1, v2);            if (v2.length() == 0) {                return; // particle is on the axis            }            v2.normalizeLocal();            rot.multLocal(v2);            float tStr = (random ? FastMath.nextRandomFloat() * strength : strength);            p.getVelocity().addLocal(v2.x * tStr * dt,                                     v2.y * tStr * dt,                                     v2.z * tStr * dt);        }