May I commit the following patch to /trunk/engine/src/core/com/jme3/shadow/AbstractShadowRenderer.java and also to /branches/gradle-restructure/jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java ?
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -122,7 +122,7 @@
* @param shadowMapSize the size of the rendered shadowmaps (512,1024,2048,
* etc...)
* @param nbShadowMaps the number of shadow maps rendered (the more shadow
- * maps the more quality, the less fps).
+ * maps the more quality, the fewer fps).
*/
protected AbstractShadowRenderer(AssetManager assetManager, int shadowMapSize, int nbShadowMaps) {
@@ -192,7 +192,7 @@
* Sets the filtering mode for shadow edges see {@link EdgeFilteringMode}
* for more info
*
- * @param EdgeFilteringMode
+ * @param filterMode the desired filter mode
*/
final public void setEdgeFilteringMode(EdgeFilteringMode filterMode) {
if (filterMode == null) {
@@ -312,7 +312,7 @@
}
/**
- * This mehtod is called once per frame. it is responsible for updating the
+ * This method is called once per frame. it is responsible for updating the
* shadow cams according to the light view.
*
* @param viewCam the scene cam
@@ -320,12 +320,13 @@
protected abstract void updateShadowCams(Camera viewCam);
/**
- * this method must return the geomtryList that contains the oclluders to be
+ * this method must return the geomtryList that contains the occluders to be
* rendered in the shadow map
*
* @param shadowMapIndex the index of the shadow map being rendered
* @param sceneOccluders the occluders of the whole scene
- * @param sceneReceivers the recievers of the whole scene
+ * @param sceneReceivers the receivers of the whole scene
+ * @param shadowMapOcculders
* @return
*/
protected abstract GeometryList getOccludersToRender(int shadowMapIndex, GeometryList sceneOccluders, GeometryList sceneReceivers, GeometryList shadowMapOccluders);
@@ -421,8 +422,8 @@
}
/**
- * For dubuging purpose Allow to "snapshot" the current frustrum to the
- * scene
+ * For debugging purposes, "snapshot" the current frustum to the
+ * scene.
*/
public void displayDebug() {
debug = true;
@@ -472,7 +473,7 @@
* This method is called once per frame and is responsible of setting the
* material parameters than sub class may need to set on the post material
*
- * @param material the materail to use for the post shadow pass
+ * @param material which material to use for the post shadow pass
*/
protected abstract void setMaterialParameters(Material material);
@@ -543,7 +544,7 @@
}
/**
- * returns the shdaow intensity
+ * Read the shadow intensity.
*
* @see #setShadowIntensity(float shadowIntensity)
* @return shadowIntensity
@@ -554,7 +555,7 @@
/**
* Set the shadowIntensity, the value should be between 0 and 1, a 0 value
- * gives a bright and invisilble shadow, a 1 value gives a pitch black
+ * gives a bright and invisible shadow, a 1 value gives a pitch black
* shadow, default is 0.7
*
* @param shadowIntensity the darkness of the shadow
@@ -606,11 +607,16 @@
this.flushQueues = flushQueues;
}
+ /**
+ * De-serialize this instance when loading from a J3O file.
+ *
+ * @param im importer (not null)
+ */
public void read(JmeImporter im) throws IOException {
InputCapsule ic = (InputCapsule) im.getCapsule(this);
assetManager = im.getAssetManager();
nbShadowMaps = ic.readInt("nbShadowMaps", 1);
- shadowMapSize = ic.readInt("shadowMapSize", 0);
+ shadowMapSize = ic.readFloat("shadowMapSize", 0f);
shadowIntensity = ic.readFloat("shadowIntensity", 0.7f);
edgeFilteringMode = ic.readEnum("edgeFilteringMode", EdgeFilteringMode.class, EdgeFilteringMode.Bilinear);
shadowCompareMode = ic.readEnum("shadowCompareMode", CompareMode.class, CompareMode.Hardware);
@@ -621,6 +627,11 @@
}
+ /**
+ * Serialize this instance when saving to a J3O file.
+ *
+ * @param ex exporter (not null)
+ */
\ No newline at end of file
public void write(JmeExporter ex) throws IOException {
OutputCapsule oc = (OutputCapsule) ex.getCapsule(this);
oc.write(nbShadowMaps, "nbShadowMaps", 1);