testStelSphereGeometry.cpp   testStelSphereGeometry.cpp 
skipping to change at line 85 skipping to change at line 85
StelUtils::spheToRect(0.1+M_PI+M_PI/2.,M_PI/2.-0.1, cpole[0]); StelUtils::spheToRect(0.1+M_PI+M_PI/2.,M_PI/2.-0.1, cpole[0]);
northPoleSquare.setContour(cpole); northPoleSquare.setContour(cpole);
StelUtils::spheToRect(0.1,-M_PI/2.+0.1, cpole[0]); StelUtils::spheToRect(0.1,-M_PI/2.+0.1, cpole[0]);
StelUtils::spheToRect(0.1+M_PI/2., -M_PI/2.+0.1, cpole[1]); StelUtils::spheToRect(0.1+M_PI/2., -M_PI/2.+0.1, cpole[1]);
StelUtils::spheToRect(0.1+M_PI, -M_PI/2.+0.1, cpole[2]); StelUtils::spheToRect(0.1+M_PI, -M_PI/2.+0.1, cpole[2]);
StelUtils::spheToRect(0.1+M_PI+M_PI/2.,-M_PI/2.+0.1, cpole[3]); StelUtils::spheToRect(0.1+M_PI+M_PI/2.,-M_PI/2.+0.1, cpole[3]);
southPoleSquare.setContour(cpole); southPoleSquare.setContour(cpole);
} }
//FIXME: Doesn't pass on Windows
void TestStelSphericalGeometry::testSphericalCap() void TestStelSphericalGeometry::testSphericalCap()
{ {
Vec3d p0(1,0,0); Vec3d p0(1.,0.,0.);
Vec3d p1(-1,0,0); Vec3d p1(-1.,0.,0.);
Vec3d p2(1,1,1); Vec3d p2(1.,1.,1.);
p2.normalize(); p2.normalize();
Vec3d p3(0,1,0); Vec3d p3(0.,1.,0.);
SphericalCap h0(p0, 0); SphericalCap h0(p0, 0.);
SphericalCap h1(p0, 0.8); SphericalCap h1(p0, 0.8);
SphericalCap h2(p0, -0.5); SphericalCap h2(p0, -0.5);
SphericalCap h3(p1, 0.5); SphericalCap h3(p1, 0.5);
SphericalCap h4(p2, 0.8); SphericalCap h4(p2, 0.8);
SphericalCap h5(p2, 1.); SphericalCap h5(p2, 1.);
SphericalCap h6(p1, 0); SphericalCap h6(p1, 0.);
QVERIFY2(h0.contains(p0), "SphericalCap contains point failure"); QVERIFY2(h0.contains(p0), "SphericalCap contains point failure");
QVERIFY2(h1.contains(p0), "SphericalCap contains point failure"); QVERIFY2(h1.contains(p0), "SphericalCap contains point failure");
QVERIFY2(h0.contains(p3), "SphericalCap contains point on the edge f ailure"); QVERIFY2(h0.contains(p3), "SphericalCap contains point on the edge f ailure");
QVERIFY2(h6.contains(p3), "SphericalCap contains point on the edge f ailure"); QVERIFY2(h6.contains(p3), "SphericalCap contains point on the edge f ailure");
QVERIFY(h0.intersects(h1)); QVERIFY(h0.intersects(h1));
QVERIFY(h0.intersects(h2)); QVERIFY(h0.intersects(h2));
QVERIFY(h1.intersects(h2)); QVERIFY(h1.intersects(h2));
QVERIFY(h4.intersects(h1)); QVERIFY(h4.intersects(h1));
 End of changes. 5 change blocks. 
7 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/