private void doTransforms(FloatBuffer bindBufPos, FloatBuffer bindBufNorm, FloatBuffer bindBufTangents, FloatBuffer bufPos, FloatBuffer bufNorm, FloatBuffer bufTangents, int start, int end, Matrix4f transform) {
        TempVars vars = TempVars.get();
        Vector3f pos = vars.vect1;
        Vector3f norm = vars.vect2;
        Vector3f tan = vars.vect3;

        int length = (end - start) * 3;
        int tanLength = (end - start) * 4;

        // offset is given in element units
        // convert to be in component units
        int offset = start * 3;
        int tanOffset = start * 4;

        bindBufPos.rewind();
        bindBufPos.get(tmpFloat, 0, length);

        if (bindBufNorm != null) {
            bindBufNorm.rewind();
            bindBufNorm.get(tmpFloatN, 0, length);
        }

        if (bindBufTangents != null) {
            bindBufTangents.rewind();
            bindBufTangents.get(tmpFloatT, 0, tanLength);
        }

        int index = 0;
        int tanIndex = 0;
        int index1, index2, tanIndex1, tanIndex2;

        while (index < length) {
            index1 = index + 1;
            index2 = index + 2;

            pos.x = tmpFloat[index];
            pos.y = tmpFloat[index1];
            pos.z = tmpFloat[index2];
            transform.mult(pos, pos);
            tmpFloat[index] = pos.x;
            tmpFloat[index1] = pos.y;
            tmpFloat[index2] = pos.z;

            if (bindBufNorm != null) {
                norm.x = tmpFloatN[index];
                norm.y = tmpFloatN[index1];
                norm.z = tmpFloatN[index2];
                transform.multNormal(norm, norm);
                tmpFloatN[index] = norm.x;
                tmpFloatN[index1] = norm.y;
                tmpFloatN[index2] = norm.z;
            }

            index += 3;

            if (bindBufTangents != null) {
                tanIndex1 = tanIndex + 1;
                tanIndex2 = tanIndex + 2;
                tan.x = tmpFloatT[tanIndex];
                tan.y = tmpFloatT[tanIndex1];
                tan.z = tmpFloatT[tanIndex2];
                transform.multNormal(tan, tan);
                tmpFloatT[tanIndex] = tan.x;
                tmpFloatT[tanIndex1] = tan.y;
                tmpFloatT[tanIndex2] = tan.z;
                tanIndex += 4;
            }

        }
        vars.release();

        //using bulk put as it's faster
        bufPos.position(offset);
        bufPos.put(tmpFloat, 0, length);

        if (bindBufNorm != null) {
            bufNorm.position(offset);
            bufNorm.put(tmpFloatN, 0, length);
        }

        if (bindBufTangents != null) {
            bufTangents.position(tanOffset);
            bufTangents.put(tmpFloatT, 0, tanLength);
        }
    }
Merges all geometries in the collection into
the output mesh. Does not take into account materials.

@param geometries
@param outMesh
jme3-core/src/main/java/com/jme3/scene/BatchNode.java