private boolean isNormalsBackward(Vector3f scalar) {
        // count number of negative scalar vector components
        int n = 0;
        if (scalar.x < 0) n++;
        if (scalar.y < 0) n++;
        if (scalar.z < 0) n++;
        // An odd number of negative components means the normal vectors
        // are backward to what they should be.
        return n == 1 || n == 3;
    }
Returns true if the geometry world scale indicates that normals will be backward.

@param scalar The geometry's world scale vector.
@return true if the normals are effectively backward; false otherwise.
jme3-core/src/main/java/com/jme3/material/Material.java