本文整理汇总了C++中Box3d::PMin方法的典型用法代码示例。如果您正苦于以下问题:C++ Box3d::PMin方法的具体用法?C++ Box3d::PMin怎么用?C++ Box3d::PMin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Box3d
的用法示例。
在下文中一共展示了Box3d::PMin方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void VisualSceneSpecPoints :: BuildScene (int zoomall)
{
if (!mesh)
{
VisualScene::BuildScene(zoomall);
return;
}
Box3d box;
if (mesh->GetNSeg())
{
box.SetPoint (mesh->Point (mesh->LineSegment(1)[0]));
for (int i = 1; i <= mesh->GetNSeg(); i++)
{
box.AddPoint (mesh->Point (mesh->LineSegment(i)[0]));
box.AddPoint (mesh->Point (mesh->LineSegment(i)[1]));
}
}
else if (specpoints.Size() >= 2)
{
box.SetPoint (specpoints.Get(1).p);
for (int i = 2; i <= specpoints.Size(); i++)
box.AddPoint (specpoints.Get(i).p);
}
else
{
box = Box3d (Point3d (0,0,0), Point3d (1,1,1));
}
if (zoomall == 2 && ((vispar.centerpoint >= 1 && vispar.centerpoint <= mesh->GetNP()) ||
vispar.use_center_coords))
{
if (vispar.use_center_coords)
{
center.X() = vispar.centerx; center.Y() = vispar.centery; center.Z() = vispar.centerz;
}
else
center = mesh->Point (vispar.centerpoint);
}
else
center = Center (box.PMin(), box.PMax());
rad = 0.5 * Dist (box.PMin(), box.PMax());
CalcTransformationMatrices();
}
示例2: AddLine
int AdFront2 :: AddLine (int pi1, int pi2,
const PointGeomInfo & gi1, const PointGeomInfo & gi2)
{
int minfn;
int li;
FrontPoint2 & p1 = points[pi1];
FrontPoint2 & p2 = points[pi2];
nfl++;
p1.AddLine();
p2.AddLine();
minfn = min2 (p1.FrontNr(), p2.FrontNr());
p1.DecFrontNr (minfn+1);
p2.DecFrontNr (minfn+1);
if (dellinel.Size() != 0)
{
li = dellinel.Last();
dellinel.DeleteLast ();
lines[li] = FrontLine (INDEX_2(pi1, pi2));
}
else
{
li = lines.Append(FrontLine (INDEX_2(pi1, pi2))) - 1;
}
if (!gi1.trignum || !gi2.trignum)
{
cout << "ERROR: in AdFront::AddLine, illegal geominfo" << endl;
}
lines[li].SetGeomInfo (gi1, gi2);
Box3d lbox;
lbox.SetPoint(p1.P());
lbox.AddPoint(p2.P());
linesearchtree.Insert (lbox.PMin(), lbox.PMax(), li);
if (allflines)
{
if (allflines->Used (INDEX_2 (GetGlobalIndex (pi1),
GetGlobalIndex (pi2))))
{
cerr << "ERROR Adfront2::AddLine: line exists" << endl;
(*testout) << "ERROR Adfront2::AddLine: line exists" << endl;
}
allflines->Set (INDEX_2 (GetGlobalIndex (pi1),
GetGlobalIndex (pi2)), 1);
}
return li;
}