diff options
author | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-11-25 12:19:18 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@digia.com> | 2013-11-25 14:22:32 +0200 |
commit | e029d0ea1d486dd3dbbfa4519a2125da202f22e4 (patch) | |
tree | fc9f87f637a9adcca5a555355d96717d43eddc77 /src/datavisualization/utils/surfaceobject.cpp | |
parent | e7e01ec065d3874d28e9e28d213783c4275d8813 (diff) |
Change qreals to floats
+ Fix default axes to sensible
+ Fix some rounding errors in surface creation
Task-number: QTRD-2622
Change-Id: I44450efc1e77ac8d8dbefc75814345949b8fb1f1
Reviewed-by: Mika Salmela <mika.salmela@digia.com>
Diffstat (limited to 'src/datavisualization/utils/surfaceobject.cpp')
-rw-r--r-- | src/datavisualization/utils/surfaceobject.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/datavisualization/utils/surfaceobject.cpp b/src/datavisualization/utils/surfaceobject.cpp index d9a32ec6..c4d8532e 100644 --- a/src/datavisualization/utils/surfaceobject.cpp +++ b/src/datavisualization/utils/surfaceobject.cpp @@ -53,8 +53,8 @@ void SurfaceObject::setUpSmoothData(const QSurfaceDataArray &dataArray, const QR GLfloat xNormalizer = (dataArray.at(0)->last().x() - xMin) / 2.0f; GLfloat yNormalizer = yRange / 2.0f; GLfloat zNormalizer = (dataArray.last()->at(0).z() - zMin) / -2.0f; - GLfloat uvX = 1.0 / GLfloat(m_columns - 1); - GLfloat uvY = 1.0 / GLfloat(m_rows - 1); + GLfloat uvX = 1.0f / GLfloat(m_columns - 1); + GLfloat uvY = 1.0f / GLfloat(m_rows - 1); m_surfaceType = SurfaceSmooth; @@ -169,8 +169,8 @@ void SurfaceObject::setUpData(const QSurfaceDataArray &dataArray, const QRect &s GLfloat xNormalizer = (dataArray.at(0)->last().x() - xMin) / 2.0f; GLfloat yNormalizer = yRange / 2.0f; GLfloat zNormalizer = (dataArray.last()->at(0).z() - zMin) / -2.0f; - GLfloat uvX = 1.0 / GLfloat(m_columns - 1); - GLfloat uvY = 1.0 / GLfloat(m_rows - 1); + GLfloat uvX = 1.0f / GLfloat(m_columns - 1); + GLfloat uvY = 1.0f / GLfloat(m_rows - 1); m_surfaceType = SurfaceFlat; |