QAspectEngine Class
class Qt3DCore::QAspectEngine씬에 등록된 모든 QAbstractAspect 하위 클래스 처리를 담당합니다. 더 보기...
헤더: | #include <Qt3DCore/QAspectEngine> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3DCore) target_link_libraries(mytarget PRIVATE Qt6::3DCore) |
qmake: | QT += 3dcore |
상속합니다: | QObject |
상태: | Deprecated |
공용 함수
QAspectEngine(QObject *parent = nullptr) | |
virtual | ~QAspectEngine() |
Qt3DCore::QAbstractAspect * | aspect(const QString &name) const |
QList<Qt3DCore::QAbstractAspect *> | aspects() const |
QVariant | executeCommand(const QString &command) |
void | processFrame() |
void | registerAspect(Qt3DCore::QAbstractAspect *aspect) |
void | registerAspect(const QString &name) |
Qt3DCore::QEntityPtr | rootEntity() const |
void | setRootEntity(Qt3DCore::QEntityPtr root) |
void | unregisterAspect(Qt3DCore::QAbstractAspect *aspect) |
void | unregisterAspect(const QString &name) |
관련 비회원
상세 설명
Qt3D 실행 루프는 Qt3DRender::QAspectEngine에 의해 제어됩니다.
Qt3DCore::QAbstractAspect 서브클래스는 Qt3DCore::QAspectEngine::registerAspect()를 호출하여 등록할 수 있으며, 이 서브클래스는 측면 등록을 처리한 후 차례로 Qt3DCore::QAbstractAspect::onRegistered()를 호출할 것입니다;
Qt3DCore::QAspectEngine 에 루트 Qt3DCore::QEntity 가 설정되는 즉시 시뮬레이션 루프가 시작됩니다. 그 다음에는 각 측면에 대해 onEngineStartup()을 호출하여 시뮬레이션 작업을 시작할 수 있도록 합니다.
루트 엔티티가 Qt3DCore::QEntityPtr()로 설정되면 시뮬레이션 루프가 중지됩니다. 그러면 각 측면의 onEngineShutdown()이 호출되어 시뮬레이션 작업 수행을 중지할 수 있습니다.
유효한 루트 엔티티를 새로 설정하면 시뮬레이션 루프가 다시 시작됩니다.
멤버 함수 문서
[explicit]
QAspectEngine::QAspectEngine(QObject *parent = nullptr)
parent 를 사용하여 새 QAspectEngine을 구축합니다.
[virtual noexcept]
QAspectEngine::~QAspectEngine()
엔진을 파괴합니다.
Qt3DCore::QAbstractAspect *QAspectEngine::aspect(const QString &name) const
에 일치하는 애스펙트를 반환합니다. name
참고: 이름으로 등록된 측면이어야 합니다.
QList<Qt3DCore::QAbstractAspect *> QAspectEngine::aspects() const
측면 엔진이 소유한 측면을 반환합니다.
QVariant QAspectEngine::executeCommand(const QString &command)
지정된 command 을 aspect 엔진에서 실행합니다. 유효한 명령은 다음과 같습니다:
- "list aspects"
명령에 대한 응답을 반환합니다.
void QAspectEngine::processFrame()
수동 실행 모드를 사용하는 경우 이 기능은 각 측면에 대한 작업을 실행합니다. 차단 중이며 모든 작업이 완료될 때까지 반환되지 않습니다.
QRenderAspect를 사용하는 경우,
void QAspectEngine::registerAspect(Qt3DCore::QAbstractAspect *aspect)
새 aspect 을 AspectManager에 등록합니다. QAspectEngine 은 해당 폼의 소유권을 가지며 폼이 등록 취소되면 해당 폼을 삭제합니다.
void QAspectEngine::registerAspect(const QString &name)
name 현재 설정된 스펙터 팩토리를 사용하여 실제 스펙터 인스턴스를 생성하기 위해 현재 설정된 스펙터 팩토리를 사용합니다.
Qt3DCore::QEntityPtr QAspectEngine::rootEntity() const
종횡비 엔진의 루트 엔티티를 반환합니다.
setRootEntity()도 참조하세요 .
void QAspectEngine::setRootEntity(Qt3DCore::QEntityPtr root)
종횡비 엔진의 root 엔티티를 설정합니다.
rootEntity()도 참조하세요 .
void QAspectEngine::unregisterAspect(Qt3DCore::QAbstractAspect *aspect)
주어진 aspect 을 등록 취소하고 삭제합니다.
void QAspectEngine::unregisterAspect(const QString &name)
주어진 name 으로 측면의 등록을 취소하고 삭제합니다.
© 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.