diff options
Diffstat (limited to 'src/logic/executor.cpp')
-rw-r--r-- | src/logic/executor.cpp | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/src/logic/executor.cpp b/src/logic/executor.cpp index 41d2f2e31..5a2f2dc51 100644 --- a/src/logic/executor.cpp +++ b/src/logic/executor.cpp @@ -58,41 +58,15 @@ Executor::Executor(QObject *parent) { } -void Executor::clearQueueAndProceed() -{ - // Clear the queue of nodes to process frame updates for (throw the work away). - // If the semaphore is acquired, release it to allow the logic job and hence the - // manager and frame to complete and shutdown to continue. - m_nodeIds.clear(); -} - -void Executor::enqueueLogicFrameUpdates(const QVector<Qt3DCore::QNodeId> &nodeIds) -{ - m_nodeIds = nodeIds; -} - -bool Executor::event(QEvent *e) -{ - if (e->type() == QEvent::User) { - FrameUpdateEvent *ev = static_cast<FrameUpdateEvent *>(e); - processLogicFrameUpdates(ev->deltaTime()); - e->setAccepted(true); - return true; - } - return false; -} - /*! - \internal - Called from context of main thread */ -void Executor::processLogicFrameUpdates(float dt) +void Executor::processLogicFrameUpdates(const QVector<QNodeId> &nodeIds, float dt) { - if (!m_scene || m_nodeIds.isEmpty()) + if (!m_scene || nodeIds.isEmpty()) return; - const QVector<QNode *> nodes = m_scene->lookupNodes(m_nodeIds); + const QVector<QNode *> nodes = m_scene->lookupNodes(nodeIds); for (QNode *node : nodes) { QFrameAction *frameAction = qobject_cast<QFrameAction *>(node); if (frameAction && frameAction->isEnabled()) |