本文整理汇总了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);
}
示例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());
}
}
示例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();
}
}
示例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();
}
}
示例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());
}
}