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

This commit is contained in:
Stephen Gold 2018-01-21 12:12:08 -08:00
parent 1b2c84da2e
commit 7ed644f442
2 changed files with 36 additions and 0 deletions

View File

@ -311,6 +311,24 @@ public abstract class AbstractShadowFilter<T extends AbstractShadowRenderer> ext
return shadowRenderer.getEdgeFilteringMode(); 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 @Override
public AbstractShadowFilter<T> jmeClone() { public AbstractShadowFilter<T> jmeClone() {
try { try {

View File

@ -725,6 +725,24 @@ public abstract class AbstractShadowRenderer implements SceneProcessor, Savable,
return (int) (edgesThickness * 10); 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 * Sets the shadow edges thickness. default is 10, setting it to lower values
* can help to reduce the jagged effect of the shadow edges * can help to reduce the jagged effect of the shadow edges