草庐IT

mRotationMatrix

全部标签

android - 在 Android 应用程序中重新映射坐标系

我正在实现一个简单的Android应用程序,我需要在其中识别北方。所以我已经实现了SensorEventListener并且我使用了这样的东西:@OverridepublicvoidonSensorChanged(SensorEventevent){if(event.sensor.getType()==Sensor.TYPE_ROTATION_VECTOR){SensorManager.getRotationMatrixFromVector(mRotationMatrix,event.values);SensorManager.remapCoordinateSystem(mRotati