本文整理汇总了C++中ON_BoundingBox::Destroy方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BoundingBox::Destroy方法的具体用法?C++ ON_BoundingBox::Destroy怎么用?C++ ON_BoundingBox::Destroy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BoundingBox
的用法示例。
在下文中一共展示了ON_BoundingBox::Destroy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BoundingBox
ON_BoundingBox ON_Geometry::BoundingBox() const
{
ON_BoundingBox bbox;
if ( !GetBoundingBox( bbox.m_min, bbox.m_max, false ) )
bbox.Destroy();
return bbox;
}
示例2: ON_Brep_GetTightBoundingBox_Helper
static bool ON_Brep_GetTightBoundingBox_Helper( const ON_Brep& brep, ON_BoundingBox& bbox, ON_Xform* xform )
{
ON_Xform xform_inverse;
ON_Xform* inverse = NULL;
if( xform )
{
xform_inverse = xform->Inverse();
inverse = &xform_inverse;
}
// make sure we have an empty/invalid bbox
bbox.Destroy();
// Compute Vertex bounding box.
int vertex_count = brep.m_V.Count();
if( xform )
{
ON_3dPointArray vtx(vertex_count);
for( int i=0; i<vertex_count; i++ )
vtx.Append(brep.m_V[i].point);
vtx.GetTightBoundingBox(bbox, false, xform);
}
else
{
for( int i=0; i<vertex_count; i++ )
bbox.Set(brep.m_V[i].point,true);
}
// Grow partial result with Edge bounding boxes.
int edge_count = brep.m_E.Count();
for( int i=0; i<edge_count; i++)
ON_Brep_GetTightCurveBoundingBox_Helper(brep.m_E[i], bbox, xform, inverse);
// Grow partial result with Face bounding boxes.
int face_count = brep.m_F.Count();
for( int i=0; i<face_count; i++)
ON_Brep_GetTightFaceBoundingBox_Helper(brep.m_F[i], bbox, xform, inverse);
return bbox.IsValid();
}
示例3: GetTightBoundingBox
bool ON_PointGrid::GetTightBoundingBox(
ON_BoundingBox& tight_bbox,
int bGrowBox,
const ON_Xform* xform
) const
{
if ( bGrowBox && !tight_bbox.IsValid() )
{
bGrowBox = false;
}
if ( !bGrowBox )
{
tight_bbox.Destroy();
}
int i;
for ( i = 0; i < m_point_count[0]; i++ )
{
if ( ON_GetPointListBoundingBox( 3, 0, m_point_count[1], 3, &m_point[i].x, tight_bbox, bGrowBox, xform ) )
bGrowBox = true;
}
return bGrowBox?true:false;
}
示例4: GetTightBoundingBox
bool ON_Geometry::GetTightBoundingBox(
ON_BoundingBox& tight_bbox,
int bGrowBox,
const ON_Xform* xform
) const
{
// This implementation should be overridden by classes devived
// from ON_Geometry
if ( bGrowBox && !tight_bbox.IsValid() )
{
bGrowBox = false;
}
if ( !bGrowBox )
{
tight_bbox.Destroy();
}
if ( xform && !xform->IsIdentity() )
{
ON_3dPointArray corners(8);
ON_BoundingBox world_bbox;
if ( GetBoundingBox(world_bbox,false) )
{
world_bbox.GetCorners(corners);
if ( corners.GetTightBoundingBox(tight_bbox,bGrowBox,xform) )
bGrowBox = true;
}
}
else
{
if ( GetBoundingBox(tight_bbox,bGrowBox) )
bGrowBox = true;
}
return bGrowBox?true:false;
}