add move to default process

Change-Id: I8d562b3e2d1bb83a6e07ed089a3006a109beeece
This commit is contained in:
weigao
2014-06-16 23:33:03 -07:00
committed by Markus Mohrhard
parent a96c575764
commit af5dfd8af2

View File

@@ -357,24 +357,19 @@ void GL3DBarChart::moveToDefault()
glm::vec3 maTargetDirection = maDefaultCameraDirection;
maStepDirection = (maTargetDirection - maCameraDirection)/((float)mnStepsTotal);
while((mnStep < mnStepsTotal) && mbBlockUserInput)
{
++mnStep;
maCameraPosition += maStep;
mpCamera->setPosition(maCameraPosition);
maCameraDirection += maStepDirection;
mpCamera->setDirection(maCameraDirection);
render();
}
maShapes.pop_back();
mbBlockUserInput = false;
mnStep = 0;
maTimer.SetTimeout(TIMEOUT);
maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, MoveToBar));
maTimer.Start();
}
void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons)
{
if(mbBlockUserInput)
return;
if (nButtons == MOUSE_RIGHT)
{
moveToDefault();
}
if(nButtons != MOUSE_LEFT)
return;