本文整理汇总了C++中SplineSurface::read方法的典型用法代码示例。如果您正苦于以下问题:C++ SplineSurface::read方法的具体用法?C++ SplineSurface::read怎么用?C++ SplineSurface::read使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SplineSurface
的用法示例。
在下文中一共展示了SplineSurface::read方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char** argv)
{
if (argc != 4) {
cout << "Usage: " << argv[0] << " FileSf FileCv aepsge" << endl;
return 0;
}
ObjectHeader header;
// Read the first curve from file
ifstream input1(argv[1]);
if (input1.bad()) {
cerr << "File #1 error (no file or corrupt file specified)."
<< std::endl;
return 1;
}
header.read(input1);
SplineSurface surf;
surf.read(input1);
input1.close();
// Read the second curve from file
ifstream input2(argv[2]);
if (input2.bad()) {
cerr << "File #2 error (no file or corrupt file specified)."
<< std::endl;
return 1;
}
header.read(input2);
SplineCurve curve;
curve.read(input2);
input2.close();
double aepsge;
aepsge = atof(argv[3]);
// Set up and run the intersection algorithm
SISLCurve* pcurve = Curve2SISL(curve);
SISLSurf* psurf = GoSurf2SISL(surf);
double astart1 = curve.startparam();
double estart2[] = { surf.startparam_u(), surf.startparam_v() };
double aend1 = curve.endparam();
double eend2[] = { surf.endparam_u(), surf.endparam_v() };
cout << "astart1 = " << astart1 << endl
<< "estart2[] = { " << estart2[0] << ", "
<< estart2[1] << " }" << endl
<< "aend1 = " << aend1 << endl
<< "eend2[] = { " << eend2[0] << ", "
<< eend2[1] << " }" << endl;
double anext1 = astart1;
double enext2[] = { estart2[0], estart2[1] };
// double anext1 = 0.0;
// double enext2[] = { 2.0, 0.0 };
cout << "anext1 = " << anext1 << endl
<< "enext2[] = { " << enext2[0] << ", "
<< enext2[1] << " }" << endl;
double cpos1;
double gpos2[2];
int jstat = 0;
cout << "jstat = " << jstat << endl;
s1772(pcurve, psurf, aepsge, astart1, estart2, aend1, eend2,
anext1, enext2, &cpos1, gpos2, &jstat);
// Write the results
cout << "Results s1772:" << endl
<< "jstat = " << jstat << endl
<< "cpos1 = " << cpos1 << endl
<< "gpos2[] = { " << gpos2[0] << ", "
<< gpos2[1] << " }" << endl;
return 0;
}