示例#1
0
        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);
        }
示例#2
0
 //  VIEWER
 public void ToggleTracking()
 {
     if (toggle.isOn)
     {
         IndicatorViewer.StartTracking();
     }
     else
     {
         IndicatorViewer.StopTracking();
     }
 }
示例#3
0
 public void ToggleTrackTarget()
 {
     if (toggle.isOn)
     {
         IndicatorViewer.TrackTarget(currentTarget);
         Debug.Log("Tracking target: " + currentTarget);
     }
     else
     {
         IndicatorViewer.UntrackTarget(currentTarget);
         Debug.Log("Untracking target: " + currentTarget);
     }
 }
示例#4
0
 private void ZoomOutButton_OnClick(object sender, RoutedEventArgs e)
 {
     IndicatorViewer.ZoomOut();
 }
示例#5
0
        private void RefreshButton_OnClick(object sender, RoutedEventArgs e)
        {
            IndicatorViewer.Refresh();

            Refresh();
        }
示例#6
0
 void Awake()
 {
     viewer = FindObjectOfType <IndicatorViewer>();
     slider = GetComponent <Slider>();
     toggle = GetComponent <Toggle>();
 }
示例#7
0
    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>();
    }