diff options
author | Keränen Pasi <pasi.keranen@digia.com> | 2013-06-19 10:31:08 +0300 |
---|---|---|
committer | Pasi Keränen <pasi.keranen@digia.com> | 2013-06-19 10:39:12 +0300 |
commit | 4f160767b41f230dc6f0be83869c74960c85e3b7 (patch) | |
tree | bbc45b6d62ab39f2a17505787d4ac5c46cd0945d /src/datavis3d/engine/drawer.cpp | |
parent | 41ba83fdb2c91cf7ab9691989f097018f4edbce8 (diff) |
CameraHelper made non-static to support multiple concurrent 3D views.
Change-Id: I88ba9ff299b4469784459e0409dfe3c629119af3
Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
Diffstat (limited to 'src/datavis3d/engine/drawer.cpp')
-rw-r--r-- | src/datavis3d/engine/drawer.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/datavis3d/engine/drawer.cpp b/src/datavis3d/engine/drawer.cpp index 094b4422..c7bef8ee 100644 --- a/src/datavis3d/engine/drawer.cpp +++ b/src/datavis3d/engine/drawer.cpp @@ -167,7 +167,9 @@ void Drawer::drawLabel(const QDataItem &item, const LabelItem &label, const QMatrix4x4 &viewmatrix, const QMatrix4x4 &projectionmatrix, const QVector3D &positionComp, const QVector3D &rotation, GLfloat maxHeight, SelectionMode mode, - ShaderHelper *shader, ObjectHelper *object, bool useDepth, bool rotateAlong, + ShaderHelper *shader, ObjectHelper *object, + CameraHelper *camera, + bool useDepth, bool rotateAlong, LabelPosition position, Qt::AlignmentFlag alignment) { // Draw label @@ -276,7 +278,7 @@ void Drawer::drawLabel(const QDataItem &item, const LabelItem &label, if (useDepth && !rotateAlong) { // Apply negative camera rotations to keep labels facing camera - QPointF camRotations = CameraHelper::getCameraRotations(); + QPointF camRotations = camera->getCameraRotations(); modelMatrix.rotate(-camRotations.x(), 0.0f, 1.0f, 0.0f); modelMatrix.rotate(-camRotations.y(), 1.0f, 0.0f, 0.0f); } |