gpt4 book ai didi

Android:理解函数remapCoordinateSystem

转载 作者:太空宇宙 更新时间:2023-11-03 13:37:31 25 4
gpt4 key购买 nike

我一直在努力理解这两行代码

SensorManager.getRotationMatrix(RTmp, I, grav, mag); 
SensorManager.remapCoordinateSystem(RTmp, SensorManager.AXIS_X,SensorManager.AXIS_MINUS_Z, Rot);

我读了the documentation of remapCoordinateSystem() ,但是我迷路了。

谁能给我解释一下 getRotationMatrixremapCoordinateSystem 到底做了什么?特别是 SensorManager.AXIS_XSensorManager.AXIS_MINUS_Z

最佳答案

我相信getRotationMatrix() 会返回一个将设备坐标 转换为世界坐标 的旋转矩阵,如android documentation 中所述,而不是“世界”到“设备”。

Computes the inclination matrix I as well as the rotation matrix R transforming a vector from the device coordinate system to the world's coordinate system which is defined as a direct orthonormal basis, where

关于Android:理解函数remapCoordinateSystem,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5142839/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com