2014-03-06 2 views
0

Я разрабатываю приложение Windows Phone 8 с GART SDK.Другой AR SDK, такой как GART SDK на Windows Phone

Но мне не нравится, потому что он перекрывает имена мест, и все они имеют одинаковый размер шрифта. Я использовал ARToolkit для iPhone, и он меняет размер шрифта, который он расположен рядом или далеко, и он не перекрывает их.

Знаете ли вы, что еще один SDK, такой как GART для Windows Phone 8?

ответ

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)); 
} 
+0

Что именно это делает/изменить? Благодаря! – casaout

Смежные вопросы