Qt3DCore::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 |
| 상태: | 사용 중단됨 |
이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.
공개 함수
| 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 ’를 어스펙트 엔진에서 실행합니다. 유효한 명령어는 다음과 같습니다:
- "list aspects"
명령에 대한 응답을 반환합니다.
void QAspectEngine::processFrame()
수동 실행 모드를 사용하는 경우, 이 함수는 각 어스펙트에 대한 작업을 실행합니다. 이 함수는 차단형이며, 모든 작업이 완료될 때까지 반환되지 않습니다.
QRenderAspect를 사용하는 경우,
void QAspectEngine::registerAspect(Qt3DCore::QAbstractAspect *aspect)
AspectManager에 새로운 aspect 를 등록합니다. QAspectEngine 는 해당 어스펙트의 소유권을 가지며, 어스펙트가 등록 해제될 때 이를 삭제합니다.
void QAspectEngine::registerAspect(const QString &name)
AspectManager에 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 를 가진 어스펙트를 등록 해제하고 삭제합니다.
© 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.