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

Impala::Core::Geometry::InterestRectangleZ::InterestRectangleZ ( std::string &  region,
Real64  shiftX = 0,
Real64  shiftY = 0 
) [inline]

Definition at line 35 of file InterestRectangleZ.h.

References Impala::Util::StringParser::GetInt(), Impala::Util::StringParser::GetString(), Impala::Core::Geometry::Rectangle::mBottom, Impala::Core::Geometry::Rectangle::mLeft, Impala::Core::Geometry::Rectangle::mRight, Impala::Core::Geometry::Rectangle::mTop, Impala::Core::Geometry::InterestPoint::mX, and Impala::Core::Geometry::InterestPoint::mY.

00035                                                                             : InterestPoint()
00036     {
00037         if(region.substr(0, 6) != "<RECT ") {
00038             throw "Get your act together: <RECT should be the start!";
00039         }
00040         Util::StringParser sp(region);
00041         std::string temp = sp.GetString(' ');   // ignore <RECT
00042         mLeft    = sp.GetInt(' ') - shiftX;
00043         mTop     = sp.GetInt(' ') - shiftY;
00044         mRight   = sp.GetInt(' ') - shiftX;
00045         mBottom  = sp.GetInt(' ') - shiftY;
00046         // update X, Y to be the center of the rectangle -> though 
00047         // these will not update when you change the rectangle...
00048         mX = static_cast<int>(((mRight - mLeft) / 2.0 + mLeft) + 0.5);
00049         mY = static_cast<int>(((mBottom - mTop) / 2.0 + mTop) + 0.5);
00050     }

Here is the call graph for this function:


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