Stellarium 0.11.4 | |||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Public Member Functions | |
SphericalPolygon (const QVector< QVector< Vec3d > > &contours) | |
Constructor from a list of contours. | |
SphericalPolygon (const QVector< Vec3d > &contour) | |
Constructor from one contour. | |
SphericalPolygon (const OctahedronPolygon &octContour) | |
SphericalPolygon (const QList< OctahedronPolygon > &octContours) | |
virtual SphericalRegionType | getType () const |
virtual OctahedronPolygon | getOctahedronPolygon () const |
Return the octahedron contour representation of the polygon. | |
virtual QVariantList | toQVariant () const |
Serialize the region into a QVariant map matching the JSON format. | |
virtual void | serialize (QDataStream &out) const |
Serialize the region. This method must allow as fast as possible serialization and work with deserialize(). | |
virtual SphericalCap | getBoundingCap () const |
Return a bounding SphericalCap. | |
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) |
Set the contours defining the SphericalPolygon. | |
void | setContour (const QVector< Vec3d > &contour) |
Set a single contour defining the SphericalPolygon. | |
QVector< QVector< Vec3d > > | getClosedOutlineContours () const |
Return the list of closed contours defining the polygon boundaries. | |
Static Public Member Functions | |
static SphericalRegionP | deserialize (QDataStream &in) |
Deserialize the region. This method must allow as fast as possible deserialization. | |
static SphericalRegionP | multiUnion (const QList< SphericalRegionP > ®ions, bool optimizeByPreGrouping=false) |
Create a new SphericalRegionP which is the union of all the passed ones. | |
static SphericalRegionP | multiIntersection (const QList< SphericalRegionP > ®ions) |
Create a new SphericalRegionP which is the intersection of all the passed ones. |
SphericalPolygon::SphericalPolygon | ( | const QVector< QVector< Vec3d > > & | contours | ) | [inline] |
Constructor from a list of contours.
SphericalPolygon::SphericalPolygon | ( | const QVector< Vec3d > & | contour | ) | [inline] |
Constructor from one contour.
static SphericalRegionP SphericalPolygon::deserialize | ( | QDataStream & | in | ) | [static] |
Deserialize the region. This method must allow as fast as possible deserialization.
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.
QVector<QVector<Vec3d> > SphericalPolygon::getClosedOutlineContours | ( | ) | const [inline] |
Return the list of closed contours defining the polygon boundaries.
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.
static SphericalRegionP SphericalPolygon::multiIntersection | ( | const QList< SphericalRegionP > & | regions | ) | [static] |
Create a new SphericalRegionP which is the intersection of all the passed ones.
static SphericalRegionP SphericalPolygon::multiUnion | ( | const QList< SphericalRegionP > & | regions, | |
bool | optimizeByPreGrouping = false | |||
) | [static] |
Create a new SphericalRegionP which is the union of all the passed ones.
virtual void SphericalPolygon::serialize | ( | QDataStream & | out | ) | const [virtual] |
Serialize the region. This method must allow as fast as possible serialization and work with deserialize().
Implements SphericalRegion.
Reimplemented in SphericalTexturedPolygon.
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.