StelSphereGeometry.cpp   StelSphereGeometry.cpp 
skipping to change at line 138 skipping to change at line 138
return contains(*static_cast<const SphericalPolygon* >(r)); return contains(*static_cast<const SphericalPolygon* >(r));
case SphericalRegion::ConvexPolygon: case SphericalRegion::ConvexPolygon:
return contains(*static_cast<const SphericalConvexPo lygon*>(r)); return contains(*static_cast<const SphericalConvexPo lygon*>(r));
case SphericalRegion::AllSky: case SphericalRegion::AllSky:
return contains(*static_cast<const AllSkySphericalRe gion*>(r)); return contains(*static_cast<const AllSkySphericalRe gion*>(r));
case SphericalRegion::Empty: case SphericalRegion::Empty:
return false; return false;
default: default:
return containsDefault(r); return containsDefault(r);
} }
Q_ASSERT(0); //Q_ASSERT(0);
return false; //return false;
} }
bool SphericalRegion::intersects(const SphericalPolygon& r) const {return i ntersectsDefault(&r);} bool SphericalRegion::intersects(const SphericalPolygon& r) const {return i ntersectsDefault(&r);}
bool SphericalRegion::intersects(const SphericalConvexPolygon& r) const {re turn intersectsDefault(&r);} bool SphericalRegion::intersects(const SphericalConvexPolygon& r) const {re turn intersectsDefault(&r);}
bool SphericalRegion::intersects(const SphericalCap& r) const {return inter sectsDefault(&r);} bool SphericalRegion::intersects(const SphericalCap& r) const {return inter sectsDefault(&r);}
bool SphericalRegion::intersects(const SphericalPoint& r) const {return con tains(r.n);} bool SphericalRegion::intersects(const SphericalPoint& r) const {return con tains(r.n);}
bool SphericalRegion::intersects(const AllSkySphericalRegion&) const {retur n getType()==SphericalRegion::Empty ? false : true;} bool SphericalRegion::intersects(const AllSkySphericalRegion&) const {retur n getType()==SphericalRegion::Empty ? false : true;}
bool SphericalRegion::intersects(const SphericalRegion* r) const bool SphericalRegion::intersects(const SphericalRegion* r) const
{ {
switch (r->getType()) switch (r->getType())
skipping to change at line 166 skipping to change at line 166
return intersects(*static_cast<const SphericalPolygo n*>(r)); return intersects(*static_cast<const SphericalPolygo n*>(r));
case SphericalRegion::ConvexPolygon: case SphericalRegion::ConvexPolygon:
return intersects(*static_cast<const SphericalConvex Polygon*>(r)); return intersects(*static_cast<const SphericalConvex Polygon*>(r));
case SphericalRegion::AllSky: case SphericalRegion::AllSky:
return intersects(*static_cast<const AllSkySpherical Region*>(r)); return intersects(*static_cast<const AllSkySpherical Region*>(r));
case SphericalRegion::Empty: case SphericalRegion::Empty:
return false; return false;
default: default:
return intersectsDefault(r); return intersectsDefault(r);
} }
Q_ASSERT(0); //Q_ASSERT(0);
return false; //return false;
} }
SphericalRegionP SphericalRegion::getIntersection(const SphericalRegion* r) const SphericalRegionP SphericalRegion::getIntersection(const SphericalRegion* r) const
{ {
switch (r->getType()) switch (r->getType())
{ {
case SphericalRegion::Point: case SphericalRegion::Point:
return getIntersection(static_cast<const SphericalPo int*>(r)->n); return getIntersection(static_cast<const SphericalPo int*>(r)->n);
case SphericalRegion::Cap: case SphericalRegion::Cap:
return getIntersection(*static_cast<const SphericalC ap*>(r)); return getIntersection(*static_cast<const SphericalC ap*>(r));
skipping to change at line 440 skipping to change at line 440
const float cosDist = v1*v2; const float cosDist = v1*v2;
if (v1*v >= cosDist && v2*v >= cosDist && v1*vv >= c osDist && v2*vv >= cosDist) if (v1*v >= cosDist && v2*v >= cosDist && v1*vv >= c osDist && v2*vv >= cosDist)
{ {
v1 = v; v1 = v;
v2 = vv; v2 = vv;
return true; return true;
} }
return false; return false;
} }
} }
Q_ASSERT(0); //Q_ASSERT(0);
return false; //return false;
} }
//! Compute the intersection of the circles defined by the 2 caps on the sp here (usually on 2 points) and return it in p1 and p2. //! Compute the intersection of the circles defined by the 2 caps on the sp here (usually on 2 points) and return it in p1 and p2.
//! If the 2 SphericalCaps don't interesect or intersect only at 1 point, f alse is returned and p1 and p2 are undefined. //! If the 2 SphericalCaps don't interesect or intersect only at 1 point, f alse is returned and p1 and p2 are undefined.
bool SphericalCap::intersectionPoints(const SphericalCap& h1, const Spheric alCap& h2, Vec3d& p1, Vec3d& p2) bool SphericalCap::intersectionPoints(const SphericalCap& h1, const Spheric alCap& h2, Vec3d& p1, Vec3d& p2)
{ {
if (!h1.intersects(h2)) if (!h1.intersects(h2))
return false; return false;
const Vec3d& n1 = h1.n; const Vec3d& n1 = h1.n;
const Vec3d& n2 = h2.n; const Vec3d& n2 = h2.n;
 End of changes. 3 change blocks. 
6 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/