本文整理汇总了C++中CBox::MaxZ方法的典型用法代码示例。如果您正苦于以下问题:C++ CBox::MaxZ方法的具体用法?C++ CBox::MaxZ怎么用?C++ CBox::MaxZ使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBox
的用法示例。
在下文中一共展示了CBox::MaxZ方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetMaxHeight
/**
Find out how high up all the objects are for this operation. From this we
will determine how far to retract the tool so as not to hit
them during rapid movements.
*/
double CAdaptive::GetMaxHeight( const int object_type, const std::list<int> & object_ids )
{
// Look through the objects that make up the model and find a safe height.
bool l_bValueUnset = true;
double max_z = -999999;
for (std::list<int>::const_iterator l_itObjectID = object_ids.begin(); l_itObjectID != object_ids.end(); l_itObjectID++)
{
HeeksObj *ob = heeksCAD->GetIDObject( object_type, *l_itObjectID );
if (ob != NULL)
{
CBox bbox;
ob->GetBox( bbox );
{
if ((l_bValueUnset) || (bbox.MaxZ() > max_z))
{
max_z = bbox.MaxZ();
l_bValueUnset = false;
} // End if - then
} // End if - then
} // End if - then
} // End for
return(max_z);
} // End GetMaxHeight() method
示例2: CBox
static void WriteCoords(std::wofstream &ofs)
{
CBox box;
GetWorldBox(box);
if(!box.m_valid)
{
box = CBox(-100, -100, -50, 100, 100, 50);
}
else
{
while(box.Width() < 100){box.m_x[0] -= 5.0; box.m_x[3] += 5.0;}
while(box.Height() < 100){box.m_x[1] -= 5.0; box.m_x[4] += 5.0;}
box.m_x[2] -= 10.0;
}
ofs<<"toolpath.coords = Coords("<<box.MinX()<<", "<<box.MinY()<<", "<<box.MinZ()<<", "<<box.MaxX()<<", "<<box.MaxY()<<", "<<box.MaxZ()<<")\n";
}