--- trunk/SHAPES/SphereHarm.cpp 2004/06/26 15:40:49 1313 +++ trunk/SHAPES/SphereHarm.cpp 2004/07/20 20:02:15 1360 @@ -111,7 +111,12 @@ void SphereHarm::printShapesFileStart(char name[200], void SphereHarm::printShapesFileStart(char name[200], char particle[80], double mass, double momInert[3][3]){ - ofstream shapes(name); + ofstream myShapes(name); + printShapesStreamStart(myShapes, particle, mass, momInert); +} + +void SphereHarm::printShapesStreamStart(ostream& shapes, char particle[80], + double mass, double momInert[3][3]){ shapes << "begin ShapeInfo\n"; shapes << "#name\t\tmass\tI_xx\tI_yy\tI_zz\n"; shapes << particle << "\t" << mass << "\t" << momInert[0][0] << "\t" @@ -119,8 +124,15 @@ void SphereHarm::printToShapesFile(char name[200], int shapes << "end ShapeInfo\n"; } + + void SphereHarm::printToShapesFile(char name[200], int index, double tolVal){ ofstream shapes(name, ios::app); + + printToShapesStream(shapes, index, tolVal); +} + +void SphereHarm::printToShapesStream(ostream& shapes, int index, double tolVal) { biggest = 0.0; nfuncs = 0;