vector4d QML Value Type
벡터4d 유형에는 x, y, z 및 w 속성이 있습니다. 더 보기...
상세 설명
vector4d
유형에는 x
, y
, z
및 w
속성이 있으며, 그 외에는 vector3d
유형과 유사합니다.
vector4d
유형의 속성은 기본적으로 0 벡터를 갖습니다. 여기에는 x
, y
,z
및 w
이 0
로 설정되어 있습니다.
자세한 내용은 vector3d
유형에 대한 문서를 참조하세요.
vector4d
값을 만들려면 "x,y,z,w" 문자열로 지정하거나 구성 요소를 개별적으로 정의하거나 Qt.vector4d() 함수를 사용하여 구성합니다.
vector4d 유형에는 QML에서 호출할 수 있는 다음과 같은 부동 함수가 있습니다:
함수 서명 | 설명 | 예제 |
---|---|---|
실수 도트 프로덕트(벡터4d 다른) | this 벡터4d와 other 벡터4d의 도트 곱의 스칼라 실수 결과를 반환합니다. | |
vector4d times(matrix4x4 행렬) | this 벡터4d를 4x4 matrix 행렬을 적용한 후 벡터로 변환한 벡터4d 결과를 반환합니다. | |
벡터4배(벡터4배 기타) | this 벡터4d에 other 벡터4d를 곱한 벡터4d 결과를 반환합니다. | |
벡터4배(실수인자) | this 벡터4d에 스칼라를 곱한 벡터4d 결과를 반환합니다. factor | var a = Qt.vector4d(1,2,3,4); var b = 4.48; var c = a.times(b); console.log(c.toString()); // QVector3D(4.48, 8.96, 13.44, 17.92) |
벡터4d 플러스(벡터4d 기타) | other 벡터4d에 this 벡터4d를 더한 벡터4d 결과를 반환합니다. | |
벡터4d 마이너스(벡터4d 기타) | this 벡터4d에서 other 벡터4d를 뺀 벡터4d 결과를 리턴합니다. | |
vector4d 정규화() | this 벡터의 정규화된 형태를 리턴합니다. | var a = Qt.vector4d(1,2,3,4); var b = a.normalized(); console.log(b.toString()); // QVector4D(0.182574, 0.365148, 0.547723, 0.730297) |
real length() | this vector3d의 길이의 스칼라 실수 값을 반환합니다. | var a = Qt.vector4d(1,2,3,4); var b = a.length(); console.log(b.toString()); // 5.477225575051661 |
vector2d toVector2d() | this vector4d를 벡터2d로 변환한 벡터2d 결과를 리턴합니다. | var a = Qt.vector4d(1,2,3,4); var b = a.toVector2d(); console.log(b.toString()); // QVector2D(1, 2) |
vector3d toVector3d() | this vector4d를 벡터3d로 변환한 벡터3d 결과를 리턴합니다. | var a = Qt.vector4d(1,2,3,4); var b = a.toVector3d(); console.log(b.toString()); // QVector3D(1, 2, 3) |
bool fuzzyEquals(vector4d other, 실수 엡실론) | this 벡터4d가 other 벡터4d와 거의 같으면 참을 리턴합니다. this 의 각 속성이 epsilon 의 other 내에 있으면 근사치는 참이 됩니다. epsilon 은 선택적 인자이며, 기본값 epsilon 은 0.00001 입니다. |
이 값 유형은 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.