ENH: add 'flip()' in-place method to edge, face, triFace

This commit is contained in:
Mark Olesen
2010-12-07 08:58:31 +01:00
parent e72d32028c
commit f367ee2ece
23 changed files with 74 additions and 22 deletions

View File

@ -99,7 +99,7 @@ int main(int argc, char *argv[])
Info<< "xB[" << xB->size() << "]\n";
DynamicList<label> dl(10);
for (label i = 0; i < 5; i++)
for (label i = 0; i < 5; ++i)
{
dl.append(i);
}
@ -111,11 +111,23 @@ int main(int argc, char *argv[])
Info<< "f1: " << f1 << endl;
Info<< "f2: " << f2 << endl;
// add some more labels
for (label i = 5; i < 8; ++i)
{
dl.append(i);
}
// note: xfer() method returns a plain labelList
face f3( dl.xfer() );
face f3(dl.xfer());
Info<< "dl[" << dl.size() << "/" << dl.capacity() << "] " << dl << endl;
Info<< "f3: " << f3 << endl;
Info<<"\nflip faces:" << endl;
f1.flip();
f3.flip();
Info<< "f1: " << f1 << endl;
Info<< "f3: " << f3 << endl;
return 0;
}