quaternion QML Value Type
쿼터니언 유형에는 스칼라, x, y, z 속성이 있습니다. 더 보기...
상세 설명
quaternion
타입에는 scalar
, x
, y
및 z
속성이 있습니다.
quaternion
값을 만들려면 "scalar,x,y,z" 문자열로 지정하거나 구성 요소를 개별적으로 정의하거나 Qt.quaternion() 함수를 사용하여 구성합니다.
쿼터니언 유형에는 QML에서 호출할 수 있는 다음과 같은 부등식 함수가 있습니다:
함수 서명 | 설명 | 예제 |
---|---|---|
실수 닷프로덕트(쿼터니언 기타) | this 쿼터니언과 other 쿼터니언의 도트 곱의 스칼라 실수 결과를 반환합니다. | |
쿼터니언 시간(쿼터니언 기타) | this 쿼터니언과 other 쿼터니언을 곱한 쿼터니언 결과를 반환하며, 이는 두 회전을 모두 적용한 것에 해당합니다. | |
벡터3d times(벡터3d 벡터) | vector 쿼터니언을 this 쿼터니언으로 회전시킨 벡터3d 결과를 반환합니다. | |
쿼터니언 times(실수 인자) | this 쿼터니언에 스칼라를 곱한 쿼터니언 결과를 반환합니다. factor | var a = Qt.quaternion(1,2,3,4); var b = 4.48; var c = a.times(b); console.log(c.toString()); // QQuaternion(4.48, 8.96, 13.44, 17.92) |
쿼터니언 플러스(쿼터니언 기타) | this 쿼터니언에 other 쿼터니언을 더한 쿼터니언 결과를 반환합니다. | |
쿼터니언 마이너스(쿼터니언 기타) | this 쿼터니언에서 other 쿼터니언을 뺀 쿼터니언 결과를 반환합니다. | |
쿼터니언 정규화() | this 쿼터니언의 정규화된 단위 형태를 반환합니다. | var a = Qt.quaternion(1,2,3,4); var b = a.normalized(); console.log(b.toString()); // QQuaternion(0.182574, 0.365148, 0.547723, 0.730297) |
쿼터니언 인버티드() | this 쿼터니언의 역을 리턴합니다. | var a = Qt.quaternion(0.5,0.5,0.5,-0.5); var b = a.inverted(); console.log(b.toString()); // QQuaternion(0.5, -0.5, -0.5, 0.5) |
쿼터니언 공액() | this 쿼터니언의 공액형을 리턴합니다. | var a = Qt.quaternion(1,2,3,4); var b = a.conjugated() console.log(b.toString()); // QQuaternion(1, -2, -3, -4) |
real length() | this 쿼터니언의 길이의 스칼라 실수값을 리턴합니다. | var a = Qt.quaternion(1,2,3,4); var b = a.length(); console.log(b.toString()); // 5.477225575051661 |
vector3d toEulerAngles() | this 쿼터니언에 대응하는 벡터3d 오일러 각도 (도)를 리턴합니다. | var a = Qt.quaternion(0.933012,0.25,-0.25,0.066987); var b = a.toEulerAngles(); console.log(b.toString()); // QVector3D(30, -30, -4.28846e-05) |
vector4d toVector4d() | this 쿼터니언를 벡터4드로 변환한 벡터4 결과를 리턴합니다. | var a = Qt.quaternion(1,2,3,4); var b = a.toVector4d(); console.log(b.toString()); // QVector4D(2, 3, 4, 1) |
bool fuzzyEquals(쿼터니언 기타, 실수 엡실론) | this 쿼터니언이 other 쿼터니언과 거의 같으면 참을 리턴합니다. this 의 각 속성이 epsilon 의 other 내에 있으면 근사치는 참이 됩니다. epsilon 은 선택적 인자이며, 기본값 epsilon 은 0.00001 입니다. |
quaternion
유형의 속성에는 Qt.quaternion(1, 0, 0, 0)
이 기본값으로 지정됩니다.
이 값 유형은 QtQuick 가져오기에서 제공됩니다.
QML 값 유형도참조하세요 .
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.