@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); direction = (Vector3f) ic.readSavable("direction", null); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); position = (Vector3f) ic.readSavable("position", null); radius = ic.readFloat("radius", 0f); if(radius!=0){ this.invRadius = 1 / radius; }else{ this.invRadius = 0; } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); spotInnerAngle = ic.readFloat("spotInnerAngle", FastMath.QUARTER_PI / 8); spotOuterAngle = ic.readFloat("spotOuterAngle", FastMath.QUARTER_PI / 6); computeAngleParameters(); direction = (Vector3f) ic.readSavable("direction", new Vector3f()); position = (Vector3f) ic.readSavable("position", new Vector3f()); spotRange = ic.readFloat("spotRange", 100); if (spotRange != 0) { this.invSpotRange = 1 / spotRange; } else { this.invSpotRange = 0; } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); prefilteredEnvMap = (TextureCubeMap) ic.readSavable("prefilteredEnvMap", null); position = (Vector3f) ic.readSavable("position", null); area = (ProbeArea)ic.readSavable("area", null); if(area == null) { // retro compat BoundingSphere bounds = (BoundingSphere) ic.readSavable("bounds", new BoundingSphere(1.0f, Vector3f.ZERO)); area = new SphereProbeArea(bounds.getCenter(), bounds.getRadius()); } area.setCenter(position); nbMipMaps = ic.readInt("nbMipMaps", 0); ready = ic.readBoolean("ready", false); Savable[] coeffs = ic.readSavableArray("shCoeffs", null); if (coeffs == null) { ready = false; logger.log(Level.WARNING, "LightProbe is missing parameters, it should be recomputed. Please use lightProbeFactory.updateProbe()"); } else { shCoeffs = new Vector3f[coeffs.length]; for (int i = 0; i < coeffs.length; i++) { shCoeffs[i] = (Vector3f) coeffs[i]; } } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); direction = (Vector3f) ic.readSavable("direction", null); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); direction = (Vector3f) ic.readSavable("direction", null); }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); position = (Vector3f) ic.readSavable("position", null); radius = ic.readFloat("radius", 0f); if(radius!=0){ this.invRadius = 1 / radius; }else{ this.invRadius = 0; } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); position = (Vector3f) ic.readSavable("position", null); radius = ic.readFloat("radius", 0f); if(radius!=0){ this.invRadius = 1 / radius; }else{ this.invRadius = 0; } } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); prefilteredEnvMap = (TextureCubeMap) ic.readSavable("prefilteredEnvMap", null); position = (Vector3f) ic.readSavable("position", null); bounds = (BoundingVolume) ic.readSavable("bounds", new BoundingSphere(1.0f, Vector3f.ZERO)); nbMipMaps = ic.readInt("nbMipMaps", 0); ready = ic.readBoolean("ready", false); Savable[] coeffs = ic.readSavableArray("shCoeffs", null); if (coeffs == null) { ready = false; logger.log(Level.WARNING, "LightProbe is missing parameters, it should be recomputed. Please use lightProbeFactory.updateProbe()"); } else { shCoeffs = new Vector3f[coeffs.length]; for (int i = 0; i < coeffs.length; i++) { shCoeffs[i] = (Vector3f) coeffs[i]; } } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); spotInnerAngle = ic.readFloat("spotInnerAngle", FastMath.QUARTER_PI / 8); spotOuterAngle = ic.readFloat("spotOuterAngle", FastMath.QUARTER_PI / 6); direction = (Vector3f) ic.readSavable("direction", new Vector3f()); position = (Vector3f) ic.readSavable("position", new Vector3f()); spotRange = ic.readFloat("spotRange", 100); if (spotRange != 0) { this.invSpotRange = 1 / spotRange; } else { this.invSpotRange = 0; } } }
@Override public void read(JmeImporter im) throws IOException { super.read(im); InputCapsule ic = im.getCapsule(this); spotInnerAngle = ic.readFloat("spotInnerAngle", FastMath.QUARTER_PI / 8); spotOuterAngle = ic.readFloat("spotOuterAngle", FastMath.QUARTER_PI / 6); computeAngleParameters(); direction = (Vector3f) ic.readSavable("direction", new Vector3f()); position = (Vector3f) ic.readSavable("position", new Vector3f()); spotRange = ic.readFloat("spotRange", 100); if (spotRange != 0) { this.invSpotRange = 1 / spotRange; } else { this.invSpotRange = 0; } }