add move to default process
Change-Id: I8d562b3e2d1bb83a6e07ed089a3006a109beeece
This commit is contained in:
@@ -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;
|
||||||
|
Reference in New Issue
Block a user