得到机器人的旋转角度在x轴 [英] Get Android rotation angle in x-axis

查看:205
本文介绍了得到机器人的旋转角度在x轴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试用一​​些Android的功能。现在,我试图让设备的旋转角度,所以当我表现出画布上一张笑脸位图,它看上去总是直。

I'm experimenting with some Android functions. Right now, I'm trying to get the rotation angle of the device, so when I show a happy face bitmap on a canvas, it always looks "straight".

所有我需要这一点,是让x轴的旋转角度(我猜的),但我无法找到如何实现它。希望你能帮助我。谢谢你。

All I would need for this, is to get the x-axis rotation angle (I guess) but I can't find how to achieve it. Hope you can help me. Thank you.

推荐答案

有方位角,俯仰和横滚提供给您。不知道哪一个涉及到你的x轴,但我认为它的方位。

There is azimuth, pitch and roll available to you. Not sure which one relates to your "x-axis" but I think its azimuth.

时间有用的链接:

  1. http://www.workingfromhere.com/blog/2009/03/30/orientation-sensor-tips-in-android/
  2. http://marakana.com/forums/android/examples/43.html
  3. http://marakana.com/static/tutorials/SensorDemo.zip
  1. http://www.workingfromhere.com/blog/2009/03/30/orientation-sensor-tips-in-android/
  2. http://marakana.com/forums/android/examples/43.html
  3. http://marakana.com/static/tutorials/SensorDemo.zip

这篇关于得到机器人的旋转角度在x轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆