summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorweigao <weigao@multicorewareinc.com>2014-05-25 13:47:44 +0800
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-05-25 12:13:55 +0200
commit32b3f7876b3cc87e42b44e595aaefb532f361424 (patch)
treee0bc542ea1e5d226fae2803060c2dbce56b39cd3 /chart2
parent04e3af7a04f3c4d299ab1f60766dbc052292be26 (diff)
fix the bar model generate
Change-Id: I8df87b27dd93f0e11198998869b97754ded3bca1
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index b49aa4c457de..bb4d2396d769 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -330,7 +330,7 @@ void OpenGL3DRenderer::CreateActualRoundedCube(float fRadius, int iSubDivY, int
{
return;
}
- float topThreshold = height - 2 * fRadius;
+ float topThreshold = depth - 2 * fRadius;
float bottomThreshold = fRadius;
std::vector<glm::vec3> vertices;
@@ -990,7 +990,8 @@ void OpenGL3DRenderer::AddShape3DExtrudeObject(bool roundedCorner, sal_uInt32 nC
m_Extrude3DInfo.rounded = roundedCorner;
if (m_Extrude3DInfo.rounded && (m_RoundBarMesh.iMeshSizes == 0))
{
- CreateActualRoundedCube(0.1f, 30, 30, 1.0f, m_Extrude3DInfo.yScale / m_Extrude3DInfo.xScale, 1.2f);
+ float radius = 0.2f;
+ CreateActualRoundedCube(radius, 30, 30, 1.0f, m_Extrude3DInfo.yScale / m_Extrude3DInfo.xScale, 1 + 2 * radius);
AddVertexData(m_CubeVertexBuf);
AddNormalData(m_CubeNormalBuf);
AddIndexData(m_CubeElementBuf);
@@ -1185,7 +1186,6 @@ void OpenGL3DRenderer::RenderExtrudeTopSurface(const Extrude3DInfo& extrude3D)
PosVecf3 trans = {extrude3D.xTransform,
extrude3D.yTransform,
extrude3D.zTransform};
-
if (actualZTrans < 0.0f)
{
// the height of rounded corner is higher than the cube than use the org scale matrix