QRayCasterHit Class

class Qt3DRender::QRayCasterHit

모델을 통해 광선을 투사할 때 적중의 세부 정보입니다. 더 보기...

헤더: #include <QRayCasterHit>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
상태: 폐지됨

공용 타입

enum HitType { TriangleHit, LineHit, PointHit, EntityHit }

공용 함수

float distance() const
Qt3DCore::QEntity *entity() const
Qt3DCore::QNodeId entityId() const
QVector3D localIntersection() const
uint primitiveIndex() const
Qt3DRender::QRayCasterHit::HitType type() const
uint vertex1Index() const
uint vertex2Index() const
uint vertex3Index() const
QVector3D worldIntersection() const

상세 설명

Qt3DRender::QRayCasterHit Qt3DRender::QRayCaster 또는 Qt3DRender::QScreenRayCaster 컴포넌트를 사용하여 모델을 통해 광선을 투사할 때 성공한 적중의 세부 정보를 포함합니다.

Qt3DRender::QRayCaster, Qt3DRender::QScreenRayCaster, Qt3DRender::QPickingSettings참조하세요 .

멤버 유형 문서

enum QRayCasterHit::HitType

반환된 히트 유형을 지정합니다. QPickingSettings 을 사용하여 제어합니다.

상수설명
Qt3DRender::QRayCasterHit::TriangleHit0선택된 프리미티브는 삼각형이고 꼭지점 인덱스는 삼각형을 구성하는 세 점을 참조합니다.
Qt3DRender::QRayCasterHit::LineHit1선택된 프리미티브는 선분이며, 처음 두 정점은 선을 구성하는 두 점을 참조합니다.
Qt3DRender::QRayCasterHit::PointHit2선택된 프리미티브는 단일 점이며, 3개의 정점 인덱스는 모두 정의되지 않습니다.
Qt3DRender::QRayCasterHit::EntityHit3바운딩 볼륨만 고려되었으며, 프리미티브와 정점 인덱스는 정의되지 않습니다.

멤버 함수 문서

float QRayCasterHit::distance() const

광선의 원점과 교차점 사이의 거리를 반환합니다.

참고: 프로퍼티 거리에 대한 겟터 함수입니다.

Qt3DCore::QEntity *QRayCasterHit::entity() const

히트된 엔티티에 대한 포인터를 반환합니다.

참고: 프로퍼티 엔티티에 대한 겟터 함수입니다.

Qt3DCore::QNodeId QRayCasterHit::entityId() const

히트된 엔티티의 ID를 반환합니다.

참고: entityId 프로퍼티에 대한 겟터 함수입니다.

QVector3D QRayCasterHit::localIntersection() const

엔티티의 좌표계에서 교차점의 좌표를 반환합니다.

참고: localIntersection 프로퍼티에 대한 겟터 함수입니다.

uint QRayCasterHit::primitiveIndex() const

선택된 프리미티브의 인덱스를 반환합니다.

참고: 프리미티브 인덱스 프로퍼티의 겟터 함수입니다.

Qt3DRender::QRayCasterHit::HitType QRayCasterHit::type() const

히트 유형을 반환합니다.

참고: 속성 유형에 대한 겟터 함수입니다.

uint QRayCasterHit::vertex1Index() const

선택된 프리미티브의 첫 번째 버텍스의 인덱스를 반환합니다.

참고: vertex1Index 프로퍼티에 대한 겟터 함수입니다.

uint QRayCasterHit::vertex2Index() const

선택된 프리미티브의 두 번째 버텍스의 인덱스를 반환합니다.

참고: vertex2Index 프로퍼티에 대한 겟터 함수입니다.

uint QRayCasterHit::vertex3Index() const

선택된 프리미티브의 세 번째 버텍스의 인덱스를 반환합니다.

참고: vertex3Index 프로퍼티에 대한 겟터 함수입니다.

QVector3D QRayCasterHit::worldIntersection() const

모델의 좌표계에서 교차점의 좌표를 반환합니다.

참고: 세계 교차점 프로퍼티의 Getter 함수입니다.

© 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.