Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

void OglGui::Carousel3D::RotateTo ( float  deg,
int  ms = 500 
) [inline]

Definition at line 153 of file Carousel3D.h.

References Clamp360(), mCenterRotY, mIsRotatingTo, mRotateTo, mRotateToDuration, mRotateToStart, and mRotateToStartTime.

Referenced by RotateToSpike().

00154     {
00155         Clamp360(mCenterRotY);
00156         Clamp360(deg);
00157 
00158         float diff    = deg - mCenterRotY;
00159         float absDiff = fabs(diff);
00160 
00161         if ((mCenterRotY == deg) || absDiff <= 0.2 || absDiff >= 359.8)
00162         {
00163             mCenterRotY     = deg;
00164             mIsRotatingTo   = false;
00165             return;
00166         }
00167         if (absDiff > 180)
00168             deg += (diff > 0 ? -360 : 360);
00169 
00170         mRotateTo           = deg;
00171         mRotateToStart      = mCenterRotY;
00172         //mRotateToDuration   = ms;
00173         mRotateToDuration   = ms/1000.0;
00174         //mRotateToStartTime  = clock();
00175         mRotateToStartTime  = OglClock();
00176         mIsRotatingTo       = true;
00177     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:26:12 2011 for ImpalaSrc by  doxygen 1.5.1