public static void evalShBasis(Vector3f texelVect, float[] shDir) {

        float xV = texelVect.x;
        float yV = texelVect.y;
        float zV = texelVect.z;

        float x2 = xV * xV;
        float y2 = yV * yV;
        float z2 = zV * zV;

        shDir[0] = (1f / (2f * sqrtPi));
        shDir[1] = -(sqrt3Pi * yV) / 2f;
        shDir[2] = (sqrt3Pi * zV) / 2f;
        shDir[3] = -(sqrt3Pi * xV) / 2f;
        shDir[4] = (sqrt15Pi * xV * yV) / 2f;
        shDir[5] = -(sqrt15Pi * yV * zV) / 2f;
        shDir[6] = (sqrt5Pi * (-1f + 3f * z2)) / 4f;
        shDir[7] = -(sqrt15Pi * xV * zV) / 2f;
        shDir[8] = sqrt15Pi * (x2 - y2) / 4f;
    }
Computes SH coefficient for a given textel dir The method used is the one
from this article : http://graphics.stanford.edu/papers/envmap/envmap.pdf

@param texelVect the input texel (not null, unaffected)
@param shDir storage for the results
jme3-core/src/main/java/com/jme3/environment/util/EnvMapUtils.java