QRayCaster Class
class Qt3DRender::QRayCasterQt3DRender::QRayCaster 는 3D 월드 좌표에서 광선 캐스팅 테스트를 수행하는 데 사용됩니다. 더 보기...
Header: | #include <QRayCaster> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
qmake: | QT += 3drender |
QML에서: | RayCaster |
상속합니다: | Qt3DRender::QAbstractRayCaster |
상태: | Deprecated |
속성
공용 기능
공용 슬롯
void | setDirection(const QVector3D &direction) |
void | setLength(float length) |
void | setOrigin(const QVector3D &origin) |
void | trigger() |
void | trigger(const QVector3D &origin, const QVector3D &direction, float length) |
신호
void | directionChanged(const QVector3D &direction) |
void | lengthChanged(float length) |
void | originChanged(const QVector3D &origin) |
상세 설명
3D 광선은 원점, 방향 및 길이로 정의됩니다. 광선이 속한 엔티티에 적용된 변환의 영향을 받습니다.
컴포넌트가 활성화되어 있는 한 매 프레임마다 레이 캐스팅 테스트가 수행됩니다. 히트 프로퍼티는 교차점 목록으로 업데이트됩니다.
QAbstractRayCaster, QScreenRayCaster, QNoPicking 를참조하세요 .
프로퍼티 문서
direction : QVector3D
3D 광선의 방향을 유지합니다. 단위 벡터여야 합니다.
함수에 액세스합니다:
QVector3D | direction() const |
void | setDirection(const QVector3D &direction) |
알림 신호:
void | directionChanged(const QVector3D &direction) |
length : float
3D 광선의 길이를 보유합니다.
기능에 액세스합니다:
float | length() const |
void | setLength(float length) |
알림 신호:
void | lengthChanged(float length) |
origin : QVector3D
3D 광선의 원점을 로컬 좌표로 유지합니다.
기능에 액세스합니다:
QVector3D | origin() const |
void | setOrigin(const QVector3D &origin) |
알림 신호:
void | originChanged(const QVector3D &origin) |
멤버 함수 문서
[slot]
void QRayCaster::setLength(float length)
광선의 길이를 length 로 설정합니다.
값이 0보다 작거나 같으면 광선은 무한대로 간주됩니다.
참고: 속성의 설정자 함수 length.
length()도 참조하세요 .
[slot]
void QRayCaster::trigger()
컴포넌트를 활성화하고 현재 광선을 사용하여 테스트를 트리거하는 편리한 메서드입니다.
[slot]
void QRayCaster::trigger(const QVector3D &origin, const QVector3D &direction, float length)
광선 세부 정보 origin, direction, length 를 설정하고 컴포넌트가 테스트를 트리거하도록 활성화하는 편리한 메서드입니다.
© 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.