本文整理汇总了C++中item_t::getLLocation方法的典型用法代码示例。如果您正苦于以下问题:C++ item_t::getLLocation方法的具体用法?C++ item_t::getLLocation怎么用?C++ item_t::getLLocation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类item_t
的用法示例。
在下文中一共展示了item_t::getLLocation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getWLocation
bool Item3D::IsAboveBelow( item_t other )
{
// cout << "IsAboveBelow " << progid() <<" "<< other->progid() << "\n";
// boxes at the same height cannot overlap each other
if( getHLocation() == other->getHLocation() )
return false;
double mw1 = getWLocation();
double mw2 = mw1 + side_1()->size() - 1;
double ml1 = getLLocation();
double ml2 = ml1 + side_3()->size() - 1;
double ow1 = other->getWLocation();
double ow2 = ow1 + other->side_1()->size() - 1;
double ol1 = other->getLLocation();
double ol2 = ow2 + other->side_3()->size() - 1;
// cout << mw1 <<" "<< mw2 <<" "<< ml1 <<" "<< ml2 <<"\n"<<
// ow1 <<" "<< ow2 <<" "<< ol1 <<" "<< ol2 <<"\n";
// http://stackoverflow.com/a/306379/16582
bool wOverlap = valueInRange(mw1, ow1, ow2) ||
valueInRange(ow1, mw1, mw2);
bool lOverlap = valueInRange(ml1, ol1, ol2) ||
valueInRange(ol1, ml1, ml2);
return wOverlap && lOverlap;
}