当前位置: 首页>>代码示例>>C#>>正文


C# SkeletonPoint.ToScreenPoint方法代码示例

本文整理汇总了C#中Microsoft.Kinect.SkeletonPoint.ToScreenPoint方法的典型用法代码示例。如果您正苦于以下问题:C# SkeletonPoint.ToScreenPoint方法的具体用法?C# SkeletonPoint.ToScreenPoint怎么用?C# SkeletonPoint.ToScreenPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Microsoft.Kinect.SkeletonPoint的用法示例。


在下文中一共展示了SkeletonPoint.ToScreenPoint方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DistanceVectorFrom

        public static Point DistanceVectorFrom(this SkeletonPoint point1, SkeletonPoint point2, double controlWidth, double controlHeight)
        {
            var screenPoint1 = point1.ToScreenPoint(controlWidth, controlHeight);
            var screenPoint2 = point2.ToScreenPoint(controlWidth, controlHeight);

            var deltaX = (screenPoint1.X - screenPoint2.X) / controlWidth;
            var deltaY = (screenPoint1.Y - screenPoint2.Y) / controlHeight;

            return new Point(deltaX, deltaY);
        }
开发者ID:vmachuca,项目名称:kinect4map,代码行数:10,代码来源:MapExtensions.cs

示例2: RunPanning

        protected override void RunPanning(SkeletonPoint handPoint)
        {
            var screenCoordinate = handPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            var location = Location.GetCoordinates(_map, screenCoordinate);
            DoPan(handPoint);

            if (KinectPanning != null)
            {
                KinectPanning(location.ToMapCoord());
            }
        }
开发者ID:vmachuca,项目名称:kinect4map,代码行数:11,代码来源:MapPanGestureHandler.cs

示例3: RunZooming

        protected override void RunZooming(SkeletonPoint rightHandPoint, SkeletonPoint leftHandPoint)
        {
            var rightHandCoordinate = rightHandPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            var leftHandCoordinate = leftHandPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            DoZoomMap(rightHandCoordinate, leftHandCoordinate);

            if (KinectZooming != null)
            {
                KinectZooming();
            }
        }
开发者ID:vmachuca,项目名称:kinect4map,代码行数:11,代码来源:MapZoomGestureHandler.cs

示例4: StartZoom

        protected override void StartZoom(SkeletonPoint rightHandPoint, SkeletonPoint leftHandPoint)
        {
            IsZooming = true;
            _startRightHandScreenCoord = rightHandPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            _startLeftHandScreenCoord = leftHandPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            _startDistance = _startRightHandScreenCoord.DistanceFrom(_startLeftHandScreenCoord);
            _startZoomLevel = _map.ZoomLevel;

            if (KinectZoomStarted != null)
            {
                KinectZoomStarted();
            }
        }
开发者ID:vmachuca,项目名称:kinect4map,代码行数:13,代码来源:MapZoomGestureHandler.cs

示例5: StartPan

        protected override void StartPan(SkeletonPoint handPoint)
        {
            IsPanning = true;
            _startHandPoint = handPoint;
            var screenCoordinate = handPoint.ToScreenPoint(_map.ActualWidth, _map.ActualHeight);
            _startHandCoordinate = Location.GetCoordinates(_map, screenCoordinate);

            var rect = _map.GeographicalBounds;

            _startExtent = new Rect(rect.TopLeft, rect.BottomRight);
            var currCenter = _map.Center;
            _startMapCenter = new Location(currCenter.Latitude, currCenter.Longitude);

            if (KinectPanStart != null)
            {
                KinectPanStart(_startHandCoordinate.ToMapCoord());
            }
        }
开发者ID:vmachuca,项目名称:kinect4map,代码行数:18,代码来源:MapPanGestureHandler.cs


注:本文中的Microsoft.Kinect.SkeletonPoint.ToScreenPoint方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。