private void ZoomActualToCenterButton_OnClick(object sender, RoutedEventArgs e) { IndicatorViewer.ZoomActual(); IndicatorViewer.X = -IndicatorViewer.BitmapSource.PixelWidth / 2.0 + IndicatorViewer.ActualWidth / 2.0; IndicatorViewer.Y = -IndicatorViewer.BitmapSource.PixelHeight / 2.0 + IndicatorViewer.ActualHeight / 2.0; IndicatorViewer.ZoomOut(); // IndicatorViewer.ZoomOut(); // IndicatorViewer.Zoom(new Point(IndicatorViewer.BitmapSource.PixelWidth/2.0,IndicatorViewer.BitmapSource.PixelHeight/2.0 ), // 0.5); }
// VIEWER public void ToggleTracking() { if (toggle.isOn) { IndicatorViewer.StartTracking(); } else { IndicatorViewer.StopTracking(); } }
public void ToggleTrackTarget() { if (toggle.isOn) { IndicatorViewer.TrackTarget(currentTarget); Debug.Log("Tracking target: " + currentTarget); } else { IndicatorViewer.UntrackTarget(currentTarget); Debug.Log("Untracking target: " + currentTarget); } }
private void ZoomOutButton_OnClick(object sender, RoutedEventArgs e) { IndicatorViewer.ZoomOut(); }
private void RefreshButton_OnClick(object sender, RoutedEventArgs e) { IndicatorViewer.Refresh(); Refresh(); }
void Awake() { viewer = FindObjectOfType <IndicatorViewer>(); slider = GetComponent <Slider>(); toggle = GetComponent <Toggle>(); }
private float distanceFromViewer; // Distance from the viewer //private float previousZposition; // The last Z position value of the scaling axis. (used for scaling the indicator) //private Vector3 previousScale; // The last local scale value of the indicator. (used for scaling the indicator) void Awake() { // Find and assign references viewer = FindObjectOfType <IndicatorViewer>(); }