void pickAnatomy_FirstFrameUpEvent(EventLayer eventLayer) { IntVector3 absMouse = eventLayer.Mouse.AbsolutePosition; if (eventLayer.EventProcessingAllowed && !travelTracker.TraveledOverLimit) { SceneViewWindow activeWindow = sceneViewController.ActiveWindow; DisplayHintLocation = new IntVector2(absMouse.x + MouseClickWindowOffset, absMouse.y + MouseClickWindowOffset); TriggeredSelection = false; Ray3 cameraRay = activeWindow.getCameraToViewportRayScreen(absMouse.x, absMouse.y); AnatomyIdentifier firstMatch; IEnumerable <Anatomy> matches = anatomyController.findAnatomy(cameraRay, out firstMatch); if (!clickedAnatomy.clickedSameAnatomy(firstMatch)) { if (matches != null) { clickedAnatomy.setNewResults(matches, firstMatch); anatomyController.processSelection(clickedAnatomy.CurrentMatch, clickedAnatomy.PreviousMatch); clickedAnatomy.moveNext(); searchBox.Caption = "Picked"; clearButton.Visible = true; } else { clickedAnatomy.clear(); anatomyController.processSelection(null, null); clearButton.Visible = false; searchBox.Caption = ""; } } else { anatomyController.processSelection(clickedAnatomy.CurrentMatch, clickedAnatomy.PreviousMatch); clickedAnatomy.moveNext(); } } }