protected PickedObject getCurrentSelection() { if (this.sceneController == null) return null; PickedObjectList pol = this.getSceneController().getPickedObjectList(); if (pol == null || pol.size() < 1) return null; PickedObject top = pol.getTopPickedObject(); return top.isTerrain() ? null : top; }
public Position getCurrentPosition() { if (this.sceneController == null) return null; PickedObjectList pol = this.getSceneController().getPickedObjectList(); if (pol == null || pol.size() < 1) return null; Position p = null; PickedObject top = pol.getTopPickedObject(); if (top != null && top.hasPosition()) p = top.getPosition(); else if (pol.getTerrainObject() != null) p = pol.getTerrainObject().getPosition(); return p; }
protected PickedObjectList getCurrentBoxSelection() { if (this.sceneController == null) return null; PickedObjectList pol = this.sceneController.getObjectsInPickRectangle(); return pol != null && pol.size() > 0 ? pol : null; }