Stellarium 0.12.0
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · Renderer · File Structure

SphericalPolygon Class Reference

List of all members.

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 > &regions, bool optimizeByPreGrouping=false)
 Create a new SphericalRegionP which is the union of all the passed ones.
static SphericalRegionP multiIntersection (const QList< SphericalRegionP > &regions)
 Create a new SphericalRegionP which is the intersection of all the passed ones.

Detailed Description

Definition at line 776 of file StelSphereGeometry.hpp.


Constructor & Destructor Documentation

SphericalPolygon::SphericalPolygon ( const QVector< QVector< Vec3d > > &  contours  )  [inline]

Constructor from a list of contours.

Definition at line 788 of file StelSphereGeometry.hpp.

SphericalPolygon::SphericalPolygon ( const QVector< Vec3d > &  contour  )  [inline]

Constructor from one contour.

Definition at line 790 of file StelSphereGeometry.hpp.


Member Function Documentation

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.

Definition at line 849 of file StelSphereGeometry.hpp.

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.

Definition at line 795 of file StelSphereGeometry.hpp.

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.

void SphericalPolygon::setContour ( const QVector< Vec3d > &  contour  )  [inline]

Set a single contour defining the SphericalPolygon.

Parameters:
contour a contour defining the polygon area.

Definition at line 843 of file StelSphereGeometry.hpp.

void SphericalPolygon::setContours ( const QVector< QVector< Vec3d > > &  contours  )  [inline]

Set the contours defining the SphericalPolygon.

Parameters:
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.

Definition at line 836 of file StelSphereGeometry.hpp.

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.


The documentation for this class was generated from the following file:
Generated on Thu Jan 31 14:05:44 2013 for Stellarium by  doxygen 1.6.3