34 label starMesh::readVtxLabel(
IFstream& is)
38 for (
int i=0; i<15; i++)
49 scalar starMesh::readVtxCmpt(
IFstream& is)
53 for (
int i=0; i<16; i++)
60 return scalar(atof(lcs));
64 void starMesh::readToNl(
IFstream& is)
70 }
while (is && c !=
'\n');
74 void starMesh::readPoints(
const scalar scaleFactor)
79 fileName pointsFileName(casePrefix_ +
".vrt");
86 if (pointsFile.good())
94 pointLabel = readVtxLabel(pointsFile);
96 if (!pointsFile)
break;
98 maxLabel =
max(maxLabel, pointLabel);
100 x = readVtxCmpt(pointsFile);
101 y = readVtxCmpt(pointsFile);
102 z = readVtxCmpt(pointsFile);
104 readToNl(pointsFile);
112 <<
"Cannot read file " << pointsFileName
117 Info<<
"Number of points = " << nPoints <<
endl <<
endl;
119 points_.setSize(nPoints);
122 starPointID_.setSize(nPoints);
128 starPointLabelLookup_.setSize(maxLabel+1);
131 starPointLabelLookup_ = -1;
138 IFstream pointsFile(pointsFileName);
143 pointLabel = readVtxLabel(pointsFile);
144 points_[
p].x() = readVtxCmpt(pointsFile);
145 points_[
p].y() = readVtxCmpt(pointsFile);
146 points_[
p].z() = readVtxCmpt(pointsFile);
148 readToNl(pointsFile);
151 starPointID_[
p] = pointLabel;
154 starPointLabelLookup_[pointLabel] =
p;
157 if (scaleFactor > 1.0 + SMALL || scaleFactor < 1.0 - SMALL)
159 points_ *= scaleFactor;
165 <<
"void starMesh::readPoints() : "
166 <<
"no points in file "