Quaternion

struct in UnityEngine


설명

쿼터니언(Quaternions)은 회전을 표현하기 위해 사용됩니다.

쿼터니언은 작지만, 짐벌 락(gimbal lock)에 걸리지 않고, 쉽게 보간될 수 있습니다. 유니티는 내부적으로 쿼터니언을 모든 회전을 포현하기 위해 사용합니다.

쿼터니언은 복잡한 수를 기반으로 하고, 직관적으로 이해하기 쉽지 않습니다. 따라서 거의 접근하지 않거나 개별 쿼터니언 컴포넌트(x,y,z,w)를 수정하지 않습니다; 대부분 기존의 회전을 취하고 (즉. Transform으로부터) 새 회전을 생성하기 위해 사용합니다. (즉 부드럽게 두 회전을 보간하기 위해서). 사용자가 가장많이 사용하는 쿼터니언 함수는 다음과 같습니다.

Quaternion.LookRotationQuaternion.AngleQuaternion.EulerQuaternion.SlerpQuaternion.FromToRotation, and Quaternion.identity. (The other functions are only for exotic uses.)

Quaternion.operator *를 사용하여 한 회전을 다른 회전으로 회전하거나 벡터를 회전하여 회전시킬 수 있습니다.

정적 변수

The identity rotation (Read Only).


변수

eulerAngles

회전(rotation)의 오일러(euler) 각도를 반환합니다.

Z X Y 만큼 회전시키는 회전을 나타냅니다. (이 순서대로)


this[int]

[0], [1], [2], [3]을 각각 사용하여 x, y, z, w 요소에 접근합니다.


w

W component of the Quaternion. Don't modify this directly unless you know quaternions inside out.


x

X component of the Quaternion. Don't modify this directly unless you know quaternions inside out.


y

Y component of the Quaternion. Don't modify this directly unless you know quaternions inside out.


z

Z component of the Quaternion. Don't modify this directly unless you know quaternions inside out.


Public 함수

Set

기존 사원수의 x,y,z와 w컴포넌트를 설정합니다.


SetFromToRotation

/fromDirection/에서 /toDirection/으로 회전한 rotation을 생성합니다.


SetLookRotation

지정된 upwards와 upwards 방향들과 함께 rotation을 생성합니다.


ToAngleAxis

rotation을 angle-axis로 변환합니다.


정적 함수

Angle

두개의 roation b와 b 사이의 각도를 반환합니다.


AngleAxis

축 axis 주위를 angle 만큼 회전한 rotation을 생성합니다.


Dot

두개의 rotation 사이의 내적.


Euler

z축 주위로 z, x축 주위로 x, y축 주위로 y 각도만큼 회전한(순서대로) Rotation을 반환합니다.


FromToRotation

/fromDirection/에서 /toDirection/으로 회전한 rotation을 생성합니다.


Inverse

/rotation/의 Inverse를 반환합니다.


Lerp

/from/과 /to/사이를 /t/로 보간하여 결과를 정규화합니다.


LerpUnclamped

/from/과 /to/사이를 /t/로 보간하여 결과를 정규화합니다.


LookRotation

지정된 upwards와 upwards 방향들과 함께 rotation을 생성합니다.


RotateTowards

from rotation 을 /to/를 바라보도록 회전합니다.


Slerp

/from/과 /to/사이를 /t/로 구형보간 합니다.


SlerpUnclamped

/from/과 /to/사이를 /t/로 구형보간 합니다.


연산자

Combines rotations lhs and rhs.


operator ==

Are two quaternions equal to each other?





'Unity > Manual' 카테고리의 다른 글

라이팅 창(Lighting Window)  (0) 2018.11.27
안드로이드 플레이어 설정(Android Player Settings)  (0) 2018.11.27
Vector3  (0) 2018.11.22
Transform  (0) 2018.11.22
캐시 서버(Cache Server)  (0) 2018.11.21

+ Recent posts