Kaydet (Commit) af5dfd8a authored tarafından weigao's avatar weigao Kaydeden (comit) Markus Mohrhard

add move to default process

Change-Id: I8d562b3e2d1bb83a6e07ed089a3006a109beeece
üst a96c5757
...@@ -357,24 +357,19 @@ void GL3DBarChart::moveToDefault() ...@@ -357,24 +357,19 @@ void GL3DBarChart::moveToDefault()
glm::vec3 maTargetDirection = maDefaultCameraDirection; glm::vec3 maTargetDirection = maDefaultCameraDirection;
maStepDirection = (maTargetDirection - maCameraDirection)/((float)mnStepsTotal); maStepDirection = (maTargetDirection - maCameraDirection)/((float)mnStepsTotal);
while((mnStep < mnStepsTotal) && mbBlockUserInput) maTimer.SetTimeout(TIMEOUT);
{ maTimer.SetTimeoutHdl(LINK(this, GL3DBarChart, MoveToBar));
++mnStep; maTimer.Start();
maCameraPosition += maStep;
mpCamera->setPosition(maCameraPosition);
maCameraDirection += maStepDirection;
mpCamera->setDirection(maCameraDirection);
render();
}
maShapes.pop_back();
mbBlockUserInput = false;
mnStep = 0;
} }
void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons) void GL3DBarChart::clickedAt(const Point& rPos, sal_uInt16 nButtons)
{ {
if(mbBlockUserInput) if(mbBlockUserInput)
return; return;
if (nButtons == MOUSE_RIGHT)
{
moveToDefault();
}
if(nButtons != MOUSE_LEFT) if(nButtons != MOUSE_LEFT)
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment