0

我正在使用GART SDK开发 Windows Phone 8 应用程序。

但我不喜欢,因为它与地名重叠,而且字体大小相同。我在 iPhone 上使用 ARToolkit,它会改变字体大小,它会改变位置的近处或远处,并且不会与它们重叠。

你知道另一个 SDK,比如 Windows Phone 8 的 GART 吗?

4

1 回答 1

0

前段时间遇到同样的问题,通过修改类的OnAttitudeChanged方法解决了WorldView

这是我在该else方法块内的代码:

else
{
    // In range so show
    wvItem.Visibility = Visibility.Visible;

    // Create a CompositeTransform to position and scale the WorldViewItem
    CompositeTransform ct = new CompositeTransform();

    // Offset by half of the WorldViewItems size to center it on the point
    ct.TranslateX = projected.X - (wvItem.ActualWidth / 2);
    ct.TranslateY = projected.Y - (wvItem.ActualHeight / 2);

    // Scale should be 100% at near clipping plane and 10% at far clipping plane
    //double scale = (double)(MathHelper.Lerp(0.1f, 1.0f, (FarClippingPlane - Math.Abs(arItem.WorldLocation.Z)) / FarClippingPlane));

    // Added to use distance
    double scale = (double)(MathHelper.Lerp(0.1f, 1.0f, (FarClippingPlane - (float)Math.Round(arItem.GeoLocation.GetDistanceTo(this.Location))) / FarClippingPlane));

    // This makes the items that are far to appear higher on screen. Values are that best fit my project, so, it should be calibrated.
    ct.TranslateY = ct.TranslateY - (int)((1-scale) * 63);

    ct.ScaleX = scale;
    ct.ScaleY = scale;

    // Set the transform, which moves the item
    wvItem.RenderTransform = ct;

    // Set the items z-index so that the closest item is always rendered on top
    Canvas.SetZIndex(wvItem, (int)(scale * 255));
}
于 2014-03-06T09:17:57.080 回答