I've implemented as I described. it's not perfect as seen in the video below but i'm satisfied with the result. there are many few scenes where this flaw will be noticable:
http://www.aptalkarga.com/tmp/shadow-shortcoming.avihowever, with the current api this implementation is not heap friendly.
this is how to disable shadows for a polygon:
SimpleVector uv0 = pm.getTextureUV(i, 0);
SimpleVector uv1 = pm.getTextureUV(i, 1);
SimpleVector uv2 = pm.getTextureUV(i, 2);
TextureInfo ti = new TextureInfo(pm.getPolygonTexture(i), uv0.x, uv0.y, uv1.x, uv1.y, uv2.x, uv2.y);
pm.setPolygonTexture(i, ti);
and to re-enable it:
SimpleVector uv0 = pm.getTextureUV(i, 0);
SimpleVector uv1 = pm.getTextureUV(i, 1);
SimpleVector uv2 = pm.getTextureUV(i, 2);
TextureInfo ti = new TextureInfo(pm.getPolygonTexture(i), uv0.x, uv0.y, uv1.x, uv1.y, uv2.x, uv2.y);
ti.add(shadowTexture, TextureInfo.MODE_MODULATE);
pm.setPolygonTexture(i, ti);
as can be seen, many objects are created during this process. same TextureInfo can be used many times but I suppose a method like PolygonManager.getTextureUV(polyID, vertexNumber, SimpleVector) is required (unless of course there is another way)
another detail is, there is no direct way of retrieving texture id of shadow map. I get it via a receiver object's polygon manager as: pm.getPolygonTextures(i)[1]. A dedicated method may be nice, although not strictly necessary.
-- o --
please see the image below. shadow of the ball is visible on the bottom side of tile. is this the way it's supposed to be? there is a culling setting in ShadowHelper which makes me think shadows should not be visible on culled faces. (it has no effect on this)
thanks..