本文整理汇总了C++中SortItem::overlap方法的典型用法代码示例。如果您正苦于以下问题:C++ SortItem::overlap方法的具体用法?C++ SortItem::overlap怎么用?C++ SortItem::overlap使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SortItem
的用法示例。
在下文中一共展示了SortItem::overlap方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
inline bool SortItem::operator<<(const SortItem& si2) const
{
const SortItem& si1 = *this;
if (si2.overlap(si1)) pout << "Overlaping" << std::endl;
else
{
pout << "Not Overlaping" << std::endl;
return false;
}
// Specialist z flat handling
pout << "if (si1.flat && si2.flat) -> if ("
<< si1.flat << " && " << si2.flat << ") -> "
<< (si1.flat && si2.flat) << std::endl;
pout << "{" << std::endl;
if (si1.flat && si2.flat)
{
// Differing z is easy for flats
//if (si1.ztop != si2.ztop) return si1.ztop < si2.ztop;
COMPARISON_RETURN(ztop,<,"\t");
// Equal z
// Animated always gets drawn after
//if (si1.anim != si2.anim) return si1.anim < si2.anim;
COMPARISON_RETURN(anim,<,"\t");
// Trans always gets drawn after
//if (si1.trans != si2.trans) return si1.trans < si2.trans;
COMPARISON_RETURN(trans,<,"\t");
// Draw always gets drawn first
//if (si1.draw != si2.draw) return si1.draw > si2.draw;
COMPARISON_RETURN(draw,>,"\t");
// Solid always gets drawn first
//if (si1.solid != si2.solid) return si1.solid > si2.solid;
COMPARISON_RETURN(solid,>,"\t");
// Occludes always get drawn first
//if (si1.occl != si2.occl) return si1.occl > si2.occl;
COMPARISON_RETURN(occl,>,"\t");
// 32x32 flats get drawn first
//if (si1.f32x32 != si2.f32x32) return si1.f32x32 > si2.f32x32;
COMPARISON_RETURN(f32x32,>,"\t");
}