Example #1
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);
        }
Example #2
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);
        }