THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/05/2003 at 23:22, xxxxxxxx wrote:
Not directly, but by looking at the connected polygons:
Neighbor n;
n.Init(p->GetPointCount(), p->GetPolygon(), p->GetPolygonCount(), NULL);
LONG pnt = 5;
LONG *dadr = NULL, dcnt = 0;
n.GetPointPolys(pnt, &dadr, &dcnt);
std::set<LONG> points;
for (LONG i = 0; i < dcnt; i++)
{
Polygon& poly = p->GetPolygon()[dadr[i]];
if (poly.c == poly.d) // Triangle
{
if (poly.a != pnt) points.insert(poly.a);
if (poly.b != pnt) points.insert(poly.b);
if (poly.c != pnt) points.insert(poly.c);
}
else // Quadrangle
{
// Check the two possible diagonals
if (poly.a != pnt && poly.c != pnt)
{
points.insert(poly.a);
points.insert(poly.c);
}
else
{
points.insert(poly.b);
points.insert(poly.d);
}
}
}
for (std::set<LONG>::const_iterator it = points.begin(); it != points.end(); ++it)
{
GePrint((it == points.begin() ? "" : ", ") + LongToString(*it));
}