本文整理汇总了C++中ON_Brep::BoundingBox方法的典型用法代码示例。如果您正苦于以下问题:C++ ON_Brep::BoundingBox方法的具体用法?C++ ON_Brep::BoundingBox怎么用?C++ ON_Brep::BoundingBox使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ON_Brep
的用法示例。
在下文中一共展示了ON_Brep::BoundingBox方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tl
int
brep_build_bvh(struct brep_specific* bs, struct rt_brep_internal* bi)
{
ON_TextLog tl(stderr);
ON_Brep* brep = bs->brep;
if (brep == NULL || !brep->IsValid(&tl)) {
bu_log("brep is NOT valid");
return -1;
}
bs->bvh = new BBNode(brep->BoundingBox());
// need to extract faces, and build bounding boxes for each face,
// then combine the face BBs back up, combining them together to
// better split the hierarchy
std::list<SurfaceTree*> surface_trees;
ON_BrepFaceArray& faces = brep->m_F;
for (int i = 0; i < faces.Count(); i++) {
TRACE1("Face: " << i);
ON_BrepFace& face = faces[i];
SurfaceTree* st = new SurfaceTree(&face);
face.m_face_user.p = st;
brep_preprocess_trims(face, st);
// add the surface bounding volumes to a list, so we can build
// down a hierarchy from the brep bounding volume
surface_trees.push_back(st);
}
brep_bvh_subdivide(bs->bvh, surface_trees);
return 0;
}