Definition at line 44 of file Camera3DXYZ.h. References mMouseX, mMouseY, OglGui::OglWindow::mOglWnd, mStepFactor, and mTextFeedBack. Referenced by DisplayFunc(). 00045 { 00046 float stepX = (mMouseX-w/2); 00047 float stepY = (mMouseY-h/2); 00048 00049 stepX *= abs(stepX) < 15 ? 1.f : abs(stepX)/15.f; 00050 stepY *= abs(stepY) < 15 ? 1.f : abs(stepY)/15.f; 00051 00052 stepX = mStepFactor * (abs(stepX) > 2 ? stepX : 0); 00053 stepY = mStepFactor * (abs(stepY) > 2 ? stepY : 0); 00054 00055 cam->camX += stepX * cam->rX + stepY * cam->uX; 00056 cam->camY += stepX * cam->rY + stepY * cam->uY; 00057 cam->camZ += stepX * cam->rZ + stepY * cam->uZ; 00058 if (!mTextFeedBack) 00059 return; 00060 oglSys.PosColPrintf(mOglWnd, mMouseX, mMouseY, oglRED, "Pan"); 00061 }
|