1 | // Copyright (C) 2015 Klaralvdalens Datakonsult AB (KDAB). |
---|---|
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #include "callbackjob_p.h" |
5 | |
6 | #include <Qt3DLogic/private/job_common_p.h> |
7 | #include <Qt3DLogic/private/manager_p.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | namespace Qt3DLogic { |
12 | namespace Logic { |
13 | |
14 | CallbackJob::CallbackJob() |
15 | : QAspectJob() |
16 | , m_logicManager(nullptr) |
17 | { |
18 | SET_JOB_RUN_STAT_TYPE(this, JobTypes::Callback, 0) |
19 | } |
20 | |
21 | void CallbackJob::setManager(Manager *manager) |
22 | { |
23 | m_logicManager = manager; |
24 | } |
25 | |
26 | void CallbackJob::run() |
27 | { |
28 | } |
29 | |
30 | bool CallbackJob::isRequired() |
31 | { |
32 | return false; |
33 | } |
34 | |
35 | void CallbackJob::postFrame(Qt3DCore::QAspectEngine *aspectEngine) |
36 | { |
37 | Q_UNUSED(aspectEngine); |
38 | Q_ASSERT(m_logicManager); |
39 | m_logicManager->triggerLogicFrameUpdates(); |
40 | } |
41 | |
42 | } // namespace Logic |
43 | } // namespace Qt3DLogic |
44 | |
45 | QT_END_NAMESPACE |
46 |