/** * {@inheritDoc} * * @see org.eclipse.draw3d.ISurface#findFigureAt(int, int, org.eclipse.draw2d.TreeSearch) */ public IFigure findFigureAt(int i_sx, int i_sy, TreeSearch i_search) { Point sLocation = Draw3DCache.getPoint(); Vector3f rayPoint = Draw3DCache.getVector3f(); try { Picker picker = m_scene.getPicker(); ISurface currentSurface = picker.getCurrentSurface(); sLocation.setLocation(i_sx, i_sy); currentSurface.getWorldLocation(sLocation, rayPoint); Hit hit = picker.getHit(rayPoint, i_search); if (hit != null) return hit.getSearchResult(); if (i_search == null || (!i_search.prune(m_host) && i_search.accept(m_host))) return m_host; return null; } finally { Draw3DCache.returnPoint(sLocation); Draw3DCache.returnVector3f(rayPoint); } }