summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2022-03-30 13:43:18 +0300
committerTomi Korpipaa <tomi.korpipaa@qt.io>2022-03-31 07:32:24 +0300
commit8cdc2cc859f46bd789e4aa84a6c1856403db8a5f (patch)
tree9f3a3e13a9344af982487b6142ca077034f9be8e /src
parentba061d0725a9b91a9da6596a82648dc5a11c6589 (diff)
Fix errors caused by dependency update
Fixes: QTBUG-102139 Change-Id: Id9bc508f714a51915fd4d8f67e36561942e19c74 Reviewed-by: Sami Varanka <sami.varanka@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/datavisualization/utils/scatterobjectbufferhelper.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/datavisualization/utils/scatterobjectbufferhelper.cpp b/src/datavisualization/utils/scatterobjectbufferhelper.cpp
index 0efd8572..bffae53e 100644
--- a/src/datavisualization/utils/scatterobjectbufferhelper.cpp
+++ b/src/datavisualization/utils/scatterobjectbufferhelper.cpp
@@ -98,7 +98,7 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
QList<QVector3D> scaled_vertices;
scaled_vertices.resize(verticeCount);
for (int i = 0; i < verticeCount; i++)
- scaled_vertices[i] = indexed_vertices[i] * modelMatrix;
+ scaled_vertices[i] = (QVector4D(indexed_vertices[i]) * modelMatrix).toVector3D();
QList<GLuint> buffered_indices;
QList<QVector3D> buffered_vertices;
@@ -141,9 +141,11 @@ void ScatterObjectBufferHelper::fullLoad(ScatterSeriesRenderCache *cache, qreal
modelMatrix = matrix.transposed(); // Because of row-column major difference
for (int j = 0; j < verticeCount; j++) {
- buffered_vertices[j + offset] = indexed_vertices[j] * modelMatrix
+ buffered_vertices[j + offset]
+ = (QVector4D(indexed_vertices[j]) * modelMatrix).toVector3D()
+ item.translation();
- buffered_normals[j + offset] = indexed_normals[j] * itModelMatrix;
+ buffered_normals[j + offset]
+ = (QVector4D(indexed_normals[j]) * itModelMatrix).toVector3D();
}
}
@@ -334,7 +336,7 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
QList<QVector3D> scaled_vertices;
scaled_vertices.resize(verticeCount);
for (int i = 0; i < verticeCount; i++)
- scaled_vertices[i] = indexed_vertices[i] * modelMatrix;
+ scaled_vertices[i] = (QVector4D(indexed_vertices[i]) * modelMatrix).toVector3D();
QList<QVector3D> buffered_vertices;
buffered_vertices.resize(verticeCount * updateSize);
@@ -356,9 +358,11 @@ void ScatterObjectBufferHelper::update(ScatterSeriesRenderCache *cache, qreal do
modelMatrix = matrix.transposed();
modelMatrix.scale(modelScaler);
- for (int j = 0; j < verticeCount; j++)
- buffered_vertices[j + offset] = indexed_vertices[j] * modelMatrix
+ for (int j = 0; j < verticeCount; j++) {
+ buffered_vertices[j + offset]
+ = (QVector4D(indexed_vertices[j]) * modelMatrix).toVector3D()
+ item.translation();
+ }
}
itemCount++;
}