diff options
author | Svenn-Arne Dragly <s@dragly.com> | 2019-02-19 20:14:41 +0100 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-03-21 12:58:31 +0000 |
commit | 3c4591088f00e154281d5c6ce041ffe7da8f557b (patch) | |
tree | 8c074517278c7fc19f330108fbafa6ec2fc76e36 /src/runtime/dragon/dragonentity.cpp | |
parent | 4b0237eb7891dacf5105e1e4ce4a5b29fc762509 (diff) |
Dragon: Introduce NodeTree
NodeTree is a separate class that holds the hierarchy of all the nodes.
This is then used to create the frame graph hierarhcy and the entity
hierarchy.
Change-Id: Idfc0b069d24b4e0ac2c108bf63f963403c8aefef
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src/runtime/dragon/dragonentity.cpp')
-rw-r--r-- | src/runtime/dragon/dragonentity.cpp | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/runtime/dragon/dragonentity.cpp b/src/runtime/dragon/dragonentity.cpp index 125e66c..a4e838c 100644 --- a/src/runtime/dragon/dragonentity.cpp +++ b/src/runtime/dragon/dragonentity.cpp @@ -67,7 +67,6 @@ void Entity::initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &chang // Note this is *not* the parentId as that is the ID of the parent QNode, which is not // necessarily the same as the parent QEntity (which may be further up the tree). m_parentEntityId = data.parentEntityId; - m_childEntityIds = data.childEntityIds; for (const auto &idAndType : qAsConst(data.componentIdsAndTypes)) addComponent(idAndType); } @@ -93,26 +92,6 @@ void Entity::sceneChangeEvent(const Qt3DCore::QSceneChangePtr &e) markDirty(); break; } - - case PropertyValueAdded: { - QPropertyNodeAddedChangePtr change = qSharedPointerCast<QPropertyNodeAddedChange>(e); - if (change->metaObject()->inherits(&QEntity::staticMetaObject)) { - if (!m_childEntityIds.contains(change->addedNodeId())) { - m_childEntityIds.push_back(change->addedNodeId()); - markDirty(Change::DirtyInfo::Tree); - } - } - break; - } - - case PropertyValueRemoved: { - QPropertyNodeRemovedChangePtr change = qSharedPointerCast<QPropertyNodeRemovedChange>(e); - if (change->metaObject()->inherits(&QEntity::staticMetaObject)) { - m_childEntityIds.removeAll(change->removedNodeId()); - markDirty(Change::DirtyInfo::Tree); - } - break; - } default: break; } |