position.add(bbX, tempVec).subtractLocal(bbY);
position.add(bbX, tempVec);
    public void updateVerts(Camera cam) {        float orient = parent.getParticleOrientation() + spinAngle;                if (type == ParticleGeometry.PT_GEOMBATCH || type == ParticleGeometry.PT_POINT) {            ; // nothing to do        } else if (cam != null && parent.isCameraFacing()) {            if (orient == 0) {                bbX.set(cam.getLeft()).multLocal(currentSize);                bbY.set(cam.getUp()).multLocal(currentSize);            } else {                float cA = FastMath.cos(orient) * currentSize;                float sA = FastMath.sin(orient) * currentSize;                bbX.set(cam.getLeft()).multLocal(cA).addLocal(cam.getUp().x * sA,                        cam.getUp().y * sA, cam.getUp().z * sA);                bbY.set(cam.getLeft()).multLocal(-sA).addLocal(cam.getUp().x * cA,                        cam.getUp().y * cA, cam.getUp().z * cA);            }        } else {            bbX.set(parent.getLeftVector()).multLocal(currentSize);            bbY.set(parent.getUpVector()).multLocal(currentSize);        }        switch (type) {            case ParticleGeometry.PT_QUAD: {                position.add(bbX, tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex);                                position.add(bbX, tempVec).addLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+1);                position.subtract(bbX, tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+2);                position.subtract(bbX, tempVec).addLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+3);                break;            }            case ParticleGeometry.PT_GEOMBATCH: {                Vector3f norm = triModel.getNormal();                if (orient != 0)                    tempQuat.fromAngleNormalAxis(orient, norm);                for (int x = 0; x < 3; x++) {                    if (orient != 0)                        tempQuat.mult(triModel.get(x), tempVec);                    else                        tempVec.set(triModel.get(x));                    tempVec.multLocal(currentSize).addLocal(position);                    BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex + x);                }                break;            }            case ParticleGeometry.PT_TRIANGLE: {                position.add(bbX, tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex);                                position.add(bbX, tempVec).addLocal(3*bbY.x, 3*bbY.y, 3*bbY.z);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+1);                position.subtract(bbX.multLocal(3), tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+2);                break;            }            case ParticleGeometry.PT_LINE: {                position.subtract(bbX, tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex);                position.add(bbX, tempVec).subtractLocal(bbY);                BufferUtils.setInBuffer(tempVec, parent.getVertexBuffer(0), startIndex+1);                break;            }            case ParticleGeometry.PT_POINT: {                BufferUtils.setInBuffer(position, parent.getVertexBuffer(0), startIndex);                break;            }        }    }