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

void Impala::Core::Geometry::RectangleTiler::GetPos2d ( float  tileW,
float  tileH,
int &  pX2d,
int &  pY2d 
) [inline]

Definition at line 88 of file RectangleTiler.h.

References Impala::Max(), mDist, mFirstLine, mLineY2d, mLineY2dInc, mPosX2d, mPosY2d, mPrevHeight2d, mPrevWidth2d, mWndHeight, and mWndWidth.

Referenced by Impala::Visualization::Window::MakeView(), and Impala::Visualization::Window::RepositionViewers().

00089     {
00090         //int s = 5; // room for window border and to separate tiles
00091         if (mFirstLine)
00092         {
00093             mFirstLine = false;
00094         }
00095         else if ((tileW+mDist <= mPrevWidth2d) && (mPosX2d != 0) &&
00096                  (mPosY2d - mLineY2d + mPrevHeight2d + tileH+mDist <= mLineY2dInc))
00097         {
00098             mPosY2d += mPrevHeight2d; // put it in a "column" on this line
00099         }
00100         else
00101         {
00102             mPosX2d += mPrevWidth2d; // advance on this line
00103             mPosY2d = mLineY2d;
00104             if (mPosX2d + tileW+mDist > mWndWidth)
00105             {
00106                 mLineY2d += mLineY2dInc;
00107                 mLineY2dInc = 0;
00108                 mPosX2d = 0;
00109                 mPosY2d = mLineY2d;
00110             }
00111         }
00112         pX2d = mPosX2d;
00113         pY2d = (int)(mWndHeight - mPosY2d - tileH - 1); // 1 is for border
00114         mLineY2dInc = Max(mLineY2dInc, (int) tileH+mDist);
00115         mPrevWidth2d = (int)(tileW+mDist);
00116         mPrevHeight2d = (int)(tileH+mDist);
00117     }

Here is the call graph for this function:


Generated on Fri Mar 19 11:11:59 2010 for ImpalaSrc by  doxygen 1.5.1