add getters to shadow renderers/filters for number of maps and sizes

empirephoenix-patch-1
Stephen Gold 7 years ago
parent 1b2c84da2e
commit 7ed644f442
  1. 18
      jme3-core/src/main/java/com/jme3/shadow/AbstractShadowFilter.java
  2. 18
      jme3-core/src/main/java/com/jme3/shadow/AbstractShadowRenderer.java

@ -311,6 +311,24 @@ public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> ext
return shadowRenderer.getEdgeFilteringMode();
}
/**
* Read the number of shadow maps rendered by this filter.
*
* @return count
*/
public int getNumShadowMaps() {
return shadowRenderer.getNumShadowMaps();
}
/**
* Read the size of each shadow map rendered by this filter.
*
* @return a map's height (which is also its width, in pixels)
*/
public int getShadowMapSize() {
return shadowRenderer.getShadowMapSize();
}
@Override
public AbstractShadowFilter<T> jmeClone() {
try {

@ -725,6 +725,24 @@ public abstract class AbstractShadowRenderer implements SceneProcessor, Savable,
return (int) (edgesThickness * 10);
}
/**
* Read the number of shadow maps rendered by this renderer.
*
* @return count
*/
public int getNumShadowMaps() {
return nbShadowMaps;
}
/**
* Read the size of each shadow map rendered by this renderer.
*
* @return a map's height (which is also its width, in pixels)
*/
public int getShadowMapSize() {
return (int) shadowMapSize;
}
/**
* Sets the shadow edges thickness. default is 10, setting it to lower values
* can help to reduce the jagged effect of the shadow edges

Loading…
Cancel
Save