0

GART SDKを使用して Windows Phone 8 アプリケーションを開発しています。

でも、地名が重なっていて、フォントサイズが同じなので、私は好きではありません。私はiPhone用のARToolkitを使用していましたが、場所が近くても遠くてもフォントサイズを変更し、重ならないようにしました。

GART for Windows Phone 8 のような別の SDK を知っていますか?

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 に答える