if (region instanceof CuboidRegion) {
return new CuboidSelection(world, selector, (CuboidRegion) region);
} else if (region instanceof Polygonal2DRegion) {
return new Polygonal2DSelection(world, selector, (Polygonal2DRegion) region);
} else if (region instanceof CylinderRegion) {
return new CylinderSelection(world, selector, (CylinderRegion) region);
} else {
return null;
}
} catch (IncompleteRegionException e) {
return null;