summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-09 05:34:34 +0200
committerMarkus Mohrhard <markus.mohrhard@collabora.co.uk>2014-05-12 03:00:04 +0200
commit720f38787c2cb6724fdb5594739563ae4489d91f (patch)
tree0764ef86b1cd62142736ca5223cf9f6db08a7cd9 /chart2
parent93268d379ebca4bc2bd3fa7bedf8f3aadf0c3d78 (diff)
initialize variables in initializer list
Change-Id: I1526d40c28a33cd29074adcc8c8d182f92996914
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/inc/GL3DRenderer.hxx12
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx16
2 files changed, 16 insertions, 12 deletions
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx b/chart2/source/view/inc/GL3DRenderer.hxx
index 6c004223d54d..c49370a90045 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -117,6 +117,10 @@ struct CameraInfo
glm::vec3 cameraPos;
glm::vec3 cameraOrg;
glm::vec3 cameraUp;
+
+ CameraInfo():
+ useDefault(true),
+ cameraUp(glm::vec3(0, 1, 0)) {}
};
struct CoordinateAxisInfo
@@ -161,6 +165,14 @@ struct SceneBox
float minYCoord;
float maxZCoord;
float minZCoord;
+
+ SceneBox():
+ maxXCoord(-1*FLT_MAX),
+ minXCoord(FLT_MAX),
+ maxYCoord(-1*FLT_MAX),
+ minYCoord(FLT_MAX),
+ maxZCoord(-1*FLT_MAX),
+ minZCoord(FLT_MAX) {}
};
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index 277b78b9ee23..b3a9c53d961f 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -66,12 +66,16 @@ GLfloat texCoords[] = {
OpenGL3DRenderer::OpenGL3DRenderer():
m_TranslationMatrix(glm::translate(m_Model, glm::vec3(0.0f, 0.0f, 0.0f)))
+ , m_bCameraUpdated(false)
, m_TextProID(0)
, m_TextMatrixID(0)
, m_TextVertexID(0)
, m_TextTexCoordID(0)
, m_TextTexCoordBuf(0)
, m_TextTexID(0)
+ , m_uiSelectFrameCounter(0)
+ , m_fViewAngle(30.0f)
+ , m_fHeightWeight(1.0f)
{
m_Polygon3DInfo.lineOnly = false;
m_Polygon3DInfo.twoSidesLighting = false;
@@ -84,19 +88,7 @@ OpenGL3DRenderer::OpenGL3DRenderer():
m_Extrude3DInfo.twoSidesLighting = false;
m_Extrude3DInfo.lineWidth = 0.001f;
- m_bCameraUpdated = false;
GetFreq();
- m_fViewAngle = 30.0f;
- m_SenceBox.maxXCoord = -1.0 * FLT_MAX;
- m_SenceBox.minXCoord = FLT_MAX;
- m_SenceBox.maxYCoord = -1.0 * FLT_MAX;
- m_SenceBox.minYCoord = FLT_MAX;
- m_SenceBox.maxZCoord = -1.0 * FLT_MAX;
- m_SenceBox.minZCoord = FLT_MAX;
- m_uiSelectFrameCounter = 0;
- m_fHeightWeight = 1.0f;
- m_CameraInfo.useDefault = true;
- m_CameraInfo.cameraUp = glm::vec3(0, 1, 0);
m_RoundBarMesh.iMeshSizes = 0;
}