Quaternion
Quaternion
설명
쿼터니언(Quaternions)은 회전을 표현하기 위해 사용됩니다.
쿼터니언은 작지만, 짐벌 락(gimbal lock)에 걸리지 않고, 쉽게 보간될 수 있습니다. 유니티는 내부적으로 쿼터니언을 모든 회전을 포현하기 위해 사용합니다.
쿼터니언은 복잡한 수를 기반으로 하고, 직관적으로 이해하기 쉽지 않습니다. 따라서 거의 접근하지 않거나 개별 쿼터니언 컴포넌트(x,y,z,w)를 수정하지 않습니다; 대부분 기존의 회전을 취하고 (즉. Transform으로부터) 새 회전을 생성하기 위해 사용합니다. (즉 부드럽게 두 회전을 보간하기 위해서). 사용자가 가장많이 사용하는 쿼터니언 함수는 다음과 같습니다.
Quaternion.LookRotation, Quaternion.Angle, Quaternion.Euler, Quaternion.Slerp, Quaternion.FromToRotation, and Quaternion.identity. (The other functions are only for exotic uses.)
Quaternion.operator *를 사용하여 한 회전을 다른 회전으로 회전하거나 벡터를 회전하여 회전시킬 수 있습니다.
정적 변수
The identity rotation (Read Only).
변수
회전(rotation)의 오일러(euler) 각도를 반환합니다.
Z X Y 만큼 회전시키는 회전을 나타냅니다. (이 순서대로)
[0], [1], [2], [3]을 각각 사용하여 x, y, z, w 요소에 접근합니다.
W component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
X component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
Y component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
Z component of the Quaternion. Don't modify this directly unless you know quaternions inside out.
Public 함수
기존 사원수의 x,y,z와 w컴포넌트를 설정합니다.
/fromDirection/에서 /toDirection/으로 회전한 rotation을 생성합니다.
지정된 upwards와 upwards 방향들과 함께 rotation을 생성합니다.
rotation을 angle-axis로 변환합니다.
정적 함수
두개의 roation b와 b 사이의 각도를 반환합니다.
축 axis 주위를 angle 만큼 회전한 rotation을 생성합니다.
두개의 rotation 사이의 내적.
z축 주위로 z, x축 주위로 x, y축 주위로 y 각도만큼 회전한(순서대로) Rotation을 반환합니다.
/fromDirection/에서 /toDirection/으로 회전한 rotation을 생성합니다.
/rotation/의 Inverse를 반환합니다.
/from/과 /to/사이를 /t/로 보간하여 결과를 정규화합니다.
/from/과 /to/사이를 /t/로 보간하여 결과를 정규화합니다.
지정된 upwards와 upwards 방향들과 함께 rotation을 생성합니다.
from rotation 을 /to/를 바라보도록 회전합니다.
/from/과 /to/사이를 /t/로 구형보간 합니다.
/from/과 /to/사이를 /t/로 구형보간 합니다.
연산자
Combines rotations lhs and rhs.
Are two quaternions equal to each other?