ARKit概念解析一: position vs worldPosition vs simdPosition

position是节点相对于其父节点的位置。如果节点是rootNode的子节点,则该位置与worldPosition相同。如果节点是不在0,0,0和/或旋转的父节点的子节点,则位置将是父节点的偏移量,worldPosition将是子节点在场景中的实际位置。

The position is the position of a node relative to its parent node. If the node is a child of the rootNode, the position is the same as the worldPosition. If the node is a child of a parent that is not at 0,0,0 and/or rotated, the position will be the offset from the parentnode, and the worldPosition will be the child node’s actual position in the scene.

worldPosition是场景中相对于世界中心(0,0,0)的位置,这是场景的根节点所在的位置。

The worldPosition is the position in the scene, relative to the center of the world (0,0,0), which is where the rootNode of the scene is.

simdPositionposition相同,但是在simd相关函数可以使用的类型中,这提供了更好的性能,特别是如果你进行了大量的矢量数学运算。如果你确实使用了simdPosition,请记住你也应该使用任何矩阵的simd等价物并将它与其他向量相乘。

The simdPosition is the same as the position but in a type that can be used by simd related functions, which offer better performance especially if you do a lot of vector math. If you do use simdPosition keep in mind you also should use the simd equivalent of any matrices and other vectors you multiply it with.

参考链接: https://stackoverflow.com/questions/46375201/arkit-position-vs-worldposition-vs-simdposition

猜你喜欢

转载自blog.csdn.net/Philm_iOS/article/details/81171031
VS