LensFlare and TriMesh

As i understand picking mechanism the result of pick is array of GeomBatch, not Geometry itself.



In source of com.jmex.effects.LensFlare in method draw(Renderer) i found condition:



if ((mesh.getType() & SceneElement.TRIMESH) != 0) {
  occludingTriMeshes.add(mesh);
} else {
this.setIntensity(0);
  break;
}



Such condition is always false. After changing SceneElement.TRIMESH -> SceneElement.TRIANGLEBATCH LensFlare works better with TriMesh objects. (Result of picking is TriangleBatch contained by TriMesh)