本文整理汇总了C++中Body::faceList方法的典型用法代码示例。如果您正苦于以下问题:C++ Body::faceList方法的具体用法?C++ Body::faceList怎么用?C++ Body::faceList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Body
的用法示例。
在下文中一共展示了Body::faceList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
static void
drawAllEdges(const Body& b, AcGiWorldDraw *pWorldDraw)
{
#ifndef NDEBUG
Adesk::UInt16 currentColor = pWorldDraw->subEntityTraits().color();
Adesk::UInt16 color = currentColor, lastColorSet = currentColor;
const Adesk::UInt16 approxColor = 1;
const Adesk::UInt16 bridgeColor = 2;
const Adesk::UInt16 firstEdgeColor = 3;
const Adesk::UInt16 secondEdgeColor = 4;
int iEdge = 0, iFaces = b.faceCount();
#endif
for (Face* f = b.faceList(); f != NULL; f = f->next())
{
if (f->edgeLoop() == NULL)
continue;
Edge* e = f->edgeLoop();
do
{
if (e->isEulerEdge())
{
#ifndef NDEBUG
if (e->isApprox())
color = approxColor;
else if (iFaces == 1 && iEdge == 0)
color = firstEdgeColor;
else if (iFaces == 1 && iEdge == 1)
color = secondEdgeColor;
else if (e->isBridge())
color = bridgeColor;
else
color = currentColor;
if (color != lastColorSet)
{
pWorldDraw->subEntityTraits().setColor(color);
lastColorSet = color;
}
iEdge++;
#else
if (e->isBridge())
continue;
#endif
Point3d p[2];
p[0] = e->point();
p[1] = e->next()->point();
pWorldDraw->geometry().polyline(2, (AcGePoint3d*)p);
}
} while ((e = e->next()) != f->edgeLoop());
}
}
示例2: drawAllEdges
void drawAllEdges(const Body& b, AcGiWorldDraw *pWorldDraw)
{
//#ifndef NDEBUG
// Adesk::UInt16 currentColor = pWorldDraw->subEntityTraits().color();
// Adesk::UInt16 color = currentColor, lastColorSet = currentColor;
// const Adesk::UInt16 approxColor = 1; // red
// const Adesk::UInt16 bridgeColor = 2; // yellow
// const Adesk::UInt16 firstEdgeColor = 3; // green
// const Adesk::UInt16 secondEdgeColor = 4; // cyan
// int iEdge = 0, iFaces = b.faceCount();
//#endif
for (Face* f = b.faceList(); f != NULL; f = f->next())
{
if (f->edgeLoop() == NULL)
continue;
Edge* e = f->edgeLoop();
do
{
if (e->isEulerEdge())
{
//#ifndef NDEBUG
// if (e->isApprox())
// color = approxColor;
// else if (iFaces == 1 && iEdge == 0)
// color = firstEdgeColor;
// else if (iFaces == 1 && iEdge == 1)
// color = secondEdgeColor;
// else if (e->isBridge())
// color = bridgeColor;
// else
// color = currentColor;
//
// if (color != lastColorSet)
// {
// pWorldDraw->subEntityTraits().setColor(color);
// lastColorSet = color;
// }
// iEdge++;
//#else
if (e->isBridge())
continue;
//#endif
Point3d p[2];
p[0] = e->point();
p[1] = e->next()->point();
pWorldDraw->geometry().polyline(2, (AcGePoint3d*)p);
}
} while ((e = e->next()) != f->edgeLoop());
}
}