augmented reality - Another AR SDK like GART SDK on Windows Phone -
i'm developing windows phone 8 application gart sdk.
but don't because overlaps places' names , has same font size. using artoolkit iphone , changes font size places near or far, , doesn't overlap them.
do know sdk gart windows phone 8?
i encountered same problem while ago, , solved modifying onattitudechanged
method of worldview
class.
this code have inside else
block of method:
else { // in range show wvitem.visibility = visibility.visible; // create compositetransform position , scale worldviewitem compositetransform ct = new compositetransform(); // offset half of worldviewitems size center on point ct.translatex = projected.x - (wvitem.actualwidth / 2); ct.translatey = projected.y - (wvitem.actualheight / 2); // scale should 100% @ near clipping plane , 10% @ far clipping plane //double scale = (double)(mathhelper.lerp(0.1f, 1.0f, (farclippingplane - math.abs(aritem.worldlocation.z)) / farclippingplane)); // added use distance double scale = (double)(mathhelper.lerp(0.1f, 1.0f, (farclippingplane - (float)math.round(aritem.geolocation.getdistanceto(this.location))) / farclippingplane)); // makes items far appear higher on screen. values best fit project, so, should calibrated. ct.translatey = ct.translatey - (int)((1-scale) * 63); ct.scalex = scale; ct.scaley = scale; // set transform, moves item wvitem.rendertransform = ct; // set items z-index closest item rendered on top canvas.setzindex(wvitem, (int)(scale * 255)); }
Comments
Post a Comment