summaryrefslogtreecommitdiffstats
path: root/src/animation/backend/channelmapper_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/animation/backend/channelmapper_p.h')
-rw-r--r--src/animation/backend/channelmapper_p.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/animation/backend/channelmapper_p.h b/src/animation/backend/channelmapper_p.h
index 710de01ab..8d8f03511 100644
--- a/src/animation/backend/channelmapper_p.h
+++ b/src/animation/backend/channelmapper_p.h
@@ -74,10 +74,22 @@ public:
void setMappingIds(const QVector<Qt3DCore::QNodeId> &mappingIds) { m_mappingIds = mappingIds; }
QVector<Qt3DCore::QNodeId> mappingIds() const { return m_mappingIds; }
+ QVector<ChannelMapping*> mappings() const
+ {
+ if (m_isDirty)
+ updateMappings();
+ return m_mappings;
+ }
+
private:
void initializeFromPeer(const Qt3DCore::QNodeCreatedChangeBasePtr &change) Q_DECL_FINAL;
+ void updateMappings() const;
QVector<Qt3DCore::QNodeId> m_mappingIds;
+
+ // Cached data
+ mutable QVector<ChannelMapping*> m_mappings;
+ mutable bool m_isDirty;
};
} // namespace Animation