public void Trans(float DistOneStep) { // 人员行走在手机宽度方向的变化 乘以100将单位m转化为mm StepTranslate[0] = StepTranslate[0] - parmap.convert_buildtoscreen(DistOneStep * AngleCos * 100); // 人员行走在手机高度方向的变化 StepTranslate[1] = StepTranslate[1] + parmap.convert_buildtoscreen(DistOneStep * AngleSin * 100); // 行走的距离 sumdistance += DistOneStep; }
float[] getposition() { float[] temp = new float[2]; temp[0] = parmap.convert_screentobuild(StepTranslate[0]); temp[1] = parmap.convert_screentobuild(StepTranslate[1]); return temp; }