![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Public Member Functions | |
SphericalPolygon (const QVector< QVector< Vec3d > > &contours) | |
SphericalPolygon (const QVector< Vec3d > &contour) | |
SphericalPolygon (const OctahedronPolygon &octContour) | |
SphericalPolygon (const QList< OctahedronPolygon > &octContours) | |
virtual SphericalRegionType | getType () const |
virtual OctahedronPolygon | getOctahedronPolygon () const |
virtual QVariantList | toQVariant () const |
virtual void | serialize (QDataStream &out) const |
virtual SphericalCap | getBoundingCap () const |
virtual bool | contains (const Vec3d &p) const |
virtual bool | contains (const SphericalPolygon &r) const |
virtual bool | contains (const SphericalConvexPolygon &r) const |
virtual bool | contains (const SphericalCap &r) const |
virtual bool | contains (const SphericalPoint &r) const |
virtual bool | contains (const AllSkySphericalRegion &r) const |
virtual bool | intersects (const SphericalPolygon &r) const |
virtual bool | intersects (const SphericalConvexPolygon &r) const |
virtual bool | intersects (const SphericalCap &r) const |
virtual bool | intersects (const SphericalPoint &r) const |
virtual bool | intersects (const AllSkySphericalRegion &) const |
virtual SphericalRegionP | getIntersection (const SphericalPoint &r) const |
virtual SphericalRegionP | getIntersection (const AllSkySphericalRegion &) const |
virtual SphericalRegionP | getUnion (const SphericalPoint &) const |
virtual SphericalRegionP | getUnion (const EmptySphericalRegion &) const |
virtual SphericalRegionP | getSubtraction (const SphericalPoint &) const |
virtual SphericalRegionP | getSubtraction (const EmptySphericalRegion &) const |
void | setContours (const QVector< QVector< Vec3d > > &contours) |
void | setContour (const QVector< Vec3d > &contour) |
QVector< QVector< Vec3d > > | getClosedOutlineContours () const |
Static Public Member Functions | |
static SphericalRegionP | deserialize (QDataStream &in) |
static SphericalRegionP | multiUnion (const QList< SphericalRegionP > ®ions, bool optimizeByPreGrouping=false) |
static SphericalRegionP | multiIntersection (const QList< SphericalRegionP > ®ions) |
virtual SphericalCap SphericalPolygon::getBoundingCap | ( | ) | const [virtual] |
Return a bounding SphericalCap.
This method is heavily used and therefore needs to be very fast. The returned SphericalCap doesn't have to be the smallest one, but smaller is better.
Reimplemented from SphericalRegion.
virtual OctahedronPolygon SphericalPolygon::getOctahedronPolygon | ( | ) | const [inline, virtual] |
Return the octahedron contour representation of the polygon.
It can be used for safe computation of intersection/union in the general case.
Implements SphericalRegion.
void SphericalPolygon::setContour | ( | const QVector< Vec3d > & | contour | ) | [inline] |
Set a single contour defining the SphericalPolygon.
contour | a contour defining the polygon area. |
void SphericalPolygon::setContours | ( | const QVector< QVector< Vec3d > > & | contours | ) | [inline] |
Set the contours defining the SphericalPolygon.
contours | the list of contours defining the polygon area. The contours are combined using the positive winding rule, meaning that the polygon is the union of the positive contours minus the negative ones. |
virtual QVariantList SphericalPolygon::toQVariant | ( | ) | const [virtual] |
Serialize the region into a QVariant map matching the JSON format.
The format is:
[[[ra,dec], [ra,dec], [ra,dec], [ra,dec]], [[ra,dec], [ra,dec], [ra,dec]],[...]]
it is a list of closed contours, with each points defined by ra dec in degree in the ICRS frame.
Implements SphericalRegion.
Reimplemented in SphericalTexturedPolygon.