Qt3DRender::QPickEvent Class
class Qt3DRender::QPickEventQPickEvent 클래스는 객체가 선택되었을 때의 정보를 저장합니다. 더 보기...
| 헤더: | #include <qpickevent.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| QML에서: | PickEvent |
| 상속: | QObject |
| 상속받는 클래스: | Qt3DRender::QPickLineEvent, Qt3DRender::QPickPointEvent, 그리고 Qt3DRender::QPickTriangleEvent |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
공개 유형
| enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
| enum | Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier } |
속성
|
공개 함수
| QPickEvent() | |
| QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance) | |
| QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Qt3DRender::QPickEvent::Buttons button, int buttons, int modifiers) | |
| Qt3DRender::QPickEvent::Buttons | button() const |
| int | buttons() const |
| float | distance() const |
| Qt3DCore::QEntity * | entity() const |
| bool | isAccepted() const |
| QVector3D | localIntersection() const |
| int | modifiers() const |
| QPointF | position() const |
| Qt3DRender::QViewport * | viewport() const |
| QVector3D | worldIntersection() const |
공개 슬롯
| void | setAccepted(bool accepted) |
신호
| void | acceptedChanged(bool accepted) |
상세 설명
픽킹이 성공하면 대부분의 QObjectPicker 컴포넌트 시그널에서 이 값을 매개변수로 수신합니다.
QPickingSettings, QPickTriangleEvent 및 QObjectPicker도 참조하십시오 .
멤버 유형 문서
enum QPickEvent::Buttons
| 상수 | 상수 |
|---|---|
Qt3DRender::QPickEvent::LeftButton | Qt::LeftButton |
Qt3DRender::QPickEvent::RightButton | Qt::RightButton |
Qt3DRender::QPickEvent::MiddleButton | Qt::MiddleButton |
Qt3DRender::QPickEvent::BackButton | Qt::BackButton |
Qt3DRender::QPickEvent::NoButton | Qt::NoButton |
enum QPickEvent::Modifiers
| 상수 | 상수 |
|---|---|
Qt3DRender::QPickEvent::NoModifier | Qt::NoModifier |
Qt3DRender::QPickEvent::ShiftModifier | Qt::ShiftModifier |
Qt3DRender::QPickEvent::ControlModifier | Qt::ControlModifier |
Qt3DRender::QPickEvent::AltModifier | Qt::AltModifier |
Qt3DRender::QPickEvent::MetaModifier | Qt::MetaModifier |
Qt3DRender::QPickEvent::KeypadModifier | Qt::KeypadModifier |
속성 문서
accepted : bool
이벤트가 수락되었는지 여부를 지정합니다
액세스 함수:
| bool | isAccepted() const |
| void | setAccepted(bool accepted) |
알림 신호:
| void | acceptedChanged(bool accepted) |
[read-only] button : const Qt3DRender::QPickEvent::Buttons
이벤트를 발생시킨 마우스 버튼을 지정합니다.
액세스 함수:
| Qt3DRender::QPickEvent::Buttons | button() const |
[read-only] buttons : const int
이 이벤트에 대한 마우스 버튼의 상태를 지정합니다
액세스 함수:
| int | buttons() const |
[read-only] distance : const float
카메라로부터 타격 지점까지의 거리를 지정합니다
액세스 함수:
| float | distance() const |
[read-only] entity : Qt3DCore::QEntity* const
선택된 지오메트리가 속한 엔티티입니다.
오브젝트 피커가 씬 그래프의 리프 노드에 연결되어 있지 않은 경우, 이 속성은 실제로 어떤 자식 엔티티가 선택되었는지 파악하는 데 유용합니다.
액세스 함수:
| Qt3DCore::QEntity * | entity() const |
[read-only] localIntersection : const QVector3D
선택된 엔티티의 국소 좌표계에서 충돌 지점의 좌표를 지정합니다.
액세스 함수:
| QVector3D | localIntersection() const |
[read-only] modifiers : const int
이 이벤트에 대한 마우스 버튼의 상태를 지정합니다.
액세스 함수:
| int | modifiers() const |
[read-only] position : const QPointF
렌더링 영역(창 또는 퀵 항목)을 기준으로 마우스 위치를 지정합니다.
액세스 함수:
| QPointF | position() const |
[read-only] viewport : Qt3DRender::QViewport* const
이 이벤트가 발생한 뷰포트입니다. null 값은 이벤트가 QViewport가 없는 프레임 그래프 분기에서 발생했음을 의미합니다. 프레임 그래프 분기에 뷰포트 내부에 또 다른 뷰포트가 있는 경우, 이 속성에는 최하위 뷰포트가 포함됩니다.
액세스 함수:
| Qt3DRender::QViewport * | viewport() const |
[read-only] worldIntersection : const QVector3D
월드 좌표계에서 명중 지점의 좌표를 지정합니다.
액세스 함수:
| QVector3D | worldIntersection() const |
멤버 함수 설명서
QPickEvent::QPickEvent()
새로운 QPickEvent 객체를 생성합니다.
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &intersection, const QVector3D &localIntersection, float distance)
주어진 매개변수( position, intersection, localIntersection 및)를 사용하여 새로운 QPickEvent 객체를 생성합니다. distance
QPickEvent::QPickEvent(const QPointF &position, const QVector3D &worldIntersection, const QVector3D &localIntersection, float distance, Qt3DRender::QPickEvent::Buttons button, int buttons, int modifiers)
주어진 매개변수( position, worldIntersection, localIntersection, distance, button, buttons 및)를 사용하여 새로운 QPickEvent 객체를 생성합니다. modifiers
Qt3DRender::QPickEvent::Buttons QPickEvent::button() const
QPickEvent::button 이벤트를 발생시킨 마우스 버튼을 반환합니다
참고: button 속성에 대한게터 함수입니다.
int QPickEvent::buttons() const
QPickEvent::buttons 픽 이벤트와 함께 발생할 수 있는 마우스 버튼 여부를 확인하는 데 사용되는 비트필드를 반환합니다.
참고: buttons 속성에 대한게터 함수입니다.
float QPickEvent::distance() const
QPickEvent::distance: 카메라에서 선택 지점까지의 거리를 반환합니다
참고: distance 속성에 대한게터 함수입니다.
bool QPickEvent::isAccepted() const
QPickEvent::isAccepted: 이벤트가 수락된 경우 true를 반환합니다
참고: accepted 속성에 대한게터 함수입니다.
QVector3D QPickEvent::localIntersection() const
QPickEvent::localIntersection: 선택된 엔티티의 국소 좌표계에서 충돌 지점의 좌표를 반환합니다.
참고: localIntersection 속성에 대한게터 함수입니다.
int QPickEvent::modifiers() const
QPickEvent::modifiers: 픽 이벤트와 함께 발생할 수 있는 키보드 수정 키를 확인하는 데 사용되는 비트 필드를 반환합니다.
참고: modifiers 속성에 대한게터 함수입니다.
QPointF QPickEvent::position() const
QPickEvent::position: 픽 쿼리의 마우스 포인터 좌표를 반환합니다.
참고: position 속성에 대한게터 함수입니다.
[slot] void QPickEvent::setAccepted(bool accepted)
QPickEvent::setAccepted: 이벤트가 수락되었는지 여부를 설정합니다. accepted
참고: accepted 속성에 대한세터 함수입니다.
isAccepted()도 참조하십시오 .
QVector3D QPickEvent::worldIntersection() const
QPickEvent::worldIntersection 월드 좌표계에서 충돌 지점의 좌표를 반환합니다
참고: worldIntersection 속성에 대한게터 함수입니다.
© 2026 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.