collideWith and Geometry


i tried to get all geometries by mouse clicking but the collision results don't include the geometry. Is this an error in jme3 or is the only way to get them by overriding the collideWith function of the geometry like this:

Geometry geo = new Geometry("example Geometry", mesh){
   public int collideWith(Collidable other, CollisionResults results)
      int i = super.collideWith(other, results);
      if(i == 1)
         results.getCollision(results.size() - 1).setGeometry(this);
      return i;

Thanks for answers.