当前位置: 首页>>代码示例>>C++>>正文


C++ ON_BoundingBox::Destroy方法代码示例

本文整理汇总了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;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:7,代码来源:opennurbs_geometry.cpp

示例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();
}
开发者ID:JohannesKu,项目名称:rhinocommon,代码行数:39,代码来源:on_geometry.cpp

示例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;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:23,代码来源:opennurbs_pointgrid.cpp

示例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;
}
开发者ID:ckvk,项目名称:opennurbs,代码行数:36,代码来源:opennurbs_geometry.cpp


注:本文中的ON_BoundingBox::Destroy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。