Beispiel #1
0
        public bool IsInRegion(TPoint p)
        {
            p.CalculateScreenfromDepthCoords();

            if ((p.ScreenX >= TopLeft.ScreenX) && (p.ScreenX <= BottomRight.ScreenX) && (p.ScreenY >= TopLeft.ScreenY) && (p.ScreenY <= BottomRight.ScreenY))
                return true;

            return false;
        }
Beispiel #2
0
        public ObjectCircle(TPoint Center)
        {
            this.InitializeComponent();

            _center = Center;

            //Automatically calculate the screen position if the depthPosition is given; set correct size of the circle
            _center.CalculateScreenfromDepthCoords();

            //update
            ChangeSize();

            _rotationTimer = new DispatcherTimer();
            _rotationTimer.Interval = new TimeSpan(0,0,0,0,50);
            _rotationTimer.Tick += new EventHandler(OnRotationTimerTick);
            _rotationTimer.IsEnabled = true;
            RotationSpeed = 20;

            SettingsManager.ScreenMappingSet.OnScreenSettingsUpdate += new ScreenMappingSettings.ScreenSettingsUpdateHandler(ScreenMappingSettings_OnScreenSettingsUpdate);
        }