コード例 #1
0
  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;
  }
コード例 #2
0
  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;
  }
コード例 #3
0
  protected PickedObjectList getCurrentBoxSelection() {
    if (this.sceneController == null) return null;

    PickedObjectList pol = this.sceneController.getObjectsInPickRectangle();
    return pol != null && pol.size() > 0 ? pol : null;
  }