StelSphereGeometry.hpp   StelSphereGeometry.hpp
skipping to change at line 299 skipping to change at line 299
//! Return true if the region is empty. //! Return true if the region is empty.
virtual bool isEmpty() const {return d>=1.;} virtual bool isEmpty() const {return d>=1.;}
//! Return a point located inside the SphericalCap. //! Return a point located inside the SphericalCap.
virtual Vec3d getPointInside() const {return n;} virtual Vec3d getPointInside() const {return n;}
//! Return itself. //! Return itself.
virtual SphericalCap getBoundingCap() const {return *this;} virtual SphericalCap getBoundingCap() const {return *this;}
// Contain and intersect // Contain and intersect
virtual bool contains(const Vec3d &v) const {Q_ASSERT(d==0 || std::f virtual bool contains(const Vec3d &v) const {Q_ASSERT(d==0 || std::f
(v*n>=d);} abs(v.lengthSquared()-1.)<0.0000002);return (v*n>=d);}
virtual bool contains(const Vec3f &v) const {Q_ASSERT(d==0 || std::f virtual bool contains(const Vec3f &v) const {Q_ASSERT(d==0 || std::f
(v[0]*n[0]+v[1]*n[1]+v[2]*n[2] abs(v.lengthSquared()-1.f)<0.000002f);return (v[0]*n[0]+v[1]*n[1]+v[2]*n[2]
>=d);} >=d);}
virtual bool contains(const SphericalConvexPolygon& r) const; virtual bool contains(const SphericalConvexPolygon& r) const;
virtual bool contains(const SphericalCap& h) const virtual bool contains(const SphericalCap& h) const
{ {
const double a = n*h.n-d*h.d; const double a = n*h.n-d*h.d;
return d<=h.d && ( a>=1. || (a>=0. && a*a >= (1.-d*d)*(1.-h. d*h.d))); return d<=h.d && ( a>=1. || (a>=0. && a*a >= (1.-d*d)*(1.-h. d*h.d)));
} }
virtual bool contains(const AllSkySphericalRegion&) const {return d< =-1;} virtual bool contains(const AllSkySphericalRegion&) const {return d< =-1;}
virtual bool intersects(const SphericalPolygon& r) const; virtual bool intersects(const SphericalPolygon& r) const;
virtual bool intersects(const SphericalConvexPolygon& r) const; virtual bool intersects(const SphericalConvexPolygon& r) const;
//! Returns whether a SphericalCap intersects with this one. //! Returns whether a SphericalCap intersects with this one.
End of changes. 1 change blocks.
5 lines changed or deleted 5 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/