Unity 3D中欧拉角与四元数关系的研究
Study on the Relationship between Euler An-gle and Quaternion in Unity 3D
摘要:
在Unity 3D游戏引擎中,物体的方位是用四元数的形式来存储的,但界面上给用户呈现的却是欧拉角。用户设置的欧拉角会先转化为四元数,最终转化为新的欧拉角,而每一个欧拉角都可以用两个四元数来表示,这样就会使问题变得非常复杂。本文给出了欧拉角的两种约定和欧拉角与四元数的数学表达式,通过对欧拉角和四元数在Unity3D游戏引擎中的实例应用的分析研究,将两者之间的转换关系做出了详细的说明。
Abstract:
In unity 3D game engine, the orientation of objects is stored in the form of quaternions, but the Euler angle is presented to the user on the interface. The user-set Euler angle is converted to quaternion first and finally to a new Euler angle, and each Euler angle can be expressed in two quaternions, which makes the problem very complicated. In this paper, two conventions of Euler angle and mathematical expressions of Euler angle and quaternion are given. By analyzing and studying the application of Euler angle and quaternion in unity 3D game engine, the transformation relationship between them is explained in detail.
参考文献
|
[1]
|
庞钦存. 四元数在游戏引擎Unity3D中的应用[J]. 产业与科技论坛, 2015, 14(17): 63-64.
|
|
[2]
|
李志伟, 李克昭, 赵磊杰, 王云凯, 梁晓庆. 基于单位四元数的任意旋转角度的三维坐标转换[J]. 大地测量与地球动力学, 2017, 37(1): 81-85.
|
|
[3]
|
鲁丹丹, 翟永翠, 周玉芳. 基于四元数的DR技术[J]. 指挥控制与仿真, 2019(2): 98-103.
|
|
[4]
|
张帆, 曹喜滨, 邹经湘. 一种新的全角度四元数与欧拉角的转换算法[J]. 南京理工大学学报(自然科学版), 2002(4): 376-380.
|
|
[5]
|
王彤, 马建仓, 秦涛, 柏会宁. 基于旋转四元数的姿态解算算法[J]. 弹箭与制导学报, 2014, 34(3): 15-16+20.
|