/** * same as * {@link EnvMapUtils#getSphericalHarmonicsCoefficents(com.jme3.texture.TextureCubeMap, com.jme3.utils.EnvMapUtils.FixSeamsMethod)} * the fix method used is {@link FixSeamsMethod#Wrap} * * @param cubeMap the environment cube map to compute SH for * @return an array of 9 vector3f representing thos coefficients for each * r,g,b channnel */ public static Vector3f[] getSphericalHarmonicsCoefficents(TextureCubeMap cubeMap) { return getSphericalHarmonicsCoefficents(cubeMap, FixSeamsMethod.Wrap); }
@Override public void run() { app.enqueue(new Callable<Void>() { @Override public Void call() throws Exception { listener.start(); return null; } }); try { Vector3f[] shCoeffs = EnvMapUtils.getSphericalHarmonicsCoefficents(sourceMap); EnvMapUtils.prepareShCoefs(shCoeffs); store.setShCoeffs(shCoeffs); } catch (Exception e) { e.printStackTrace(); } app.enqueue(new Callable<Void>() { @Override public Void call() throws Exception { listener.done(6); return null; } }); }
/** * same as * {@link EnvMapUtils#getSphericalHarmonicsCoefficents(com.jme3.texture.TextureCubeMap, com.jme3.utils.EnvMapUtils.FixSeamsMethod)} * the fix method used is {@link FixSeamsMethod#Wrap} * * @param cubeMap the environment cube map to compute SH for * @return an array of 9 vector3f representing thos coefficients for each * r,g,b channnel */ public static Vector3f[] getSphericalHarmonicsCoefficents(TextureCubeMap cubeMap) { return getSphericalHarmonicsCoefficents(cubeMap, FixSeamsMethod.Wrap); }
@Override public void run() { app.enqueue(new Callable<Void>() { @Override public Void call() throws Exception { listener.start(); return null; } }); try { Vector3f[] shCoeffs = EnvMapUtils.getSphericalHarmonicsCoefficents(sourceMap); EnvMapUtils.prepareShCoefs(shCoeffs); store.setShCoeffs(shCoeffs); } catch (Exception e) { e.printStackTrace(); } app.enqueue(new Callable<Void>() { @Override public Void call() throws Exception { listener.done(6); return null; } }); }