本文整理汇总了C++中ON_BoundingBox::Set方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_BoundingBox::Set方法的具体用法?C++ ON_BoundingBox::Set怎么用?C++ ON_BoundingBox::Set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_BoundingBox
的用法示例。
在下文中一共展示了ON_BoundingBox::Set方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BoundingBox
ON_BoundingBox ON_Box::BoundingBox() const
{
ON_BoundingBox bbox;
ON_3dPoint corners[8];
if ( GetCorners(corners) )
bbox.Set(3,0,8,3,&corners[0].x,false);
return bbox;
}
示例2: GetBoundingBox
bool ON_Line::GetBoundingBox(
ON_BoundingBox& bbox,
int bGrowBox
) const
{
bbox.Set( 3, false, 2, 3, &from.x, bGrowBox );
return true;
}
示例3: BoundingBox
ON_BoundingBox ON_Circle::BoundingBox() const
{
ON_BoundingBox bbox;
ON_3dPoint corners[4]; // = corners of square that contains circle
corners[0] = plane.PointAt( radius, radius );
corners[1] = plane.PointAt( radius,-radius );
corners[2] = plane.PointAt(-radius, radius );
corners[3] = plane.PointAt(-radius,-radius );
bbox.Set(3,0,4,3,&corners[0].x,false);
return bbox;
}
示例4: 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();
}
示例5: BoundingBox
ON_BoundingBox ON_Line::BoundingBox() const
{
ON_BoundingBox bbox;
bbox.Set( 3, false, 2, 3, &from.x, false );
return bbox;
}