![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
#include <StelSphereGeometry.hpp>
Inherits QSharedPointer.
Public Member Functions | |
SphericalRegionP (SphericalRegion *ptr) | |
template<class Deleter> | |
SphericalRegionP (SphericalRegion *ptr, Deleter deleter) | |
SphericalRegionP (const SphericalRegionP &other) | |
SphericalRegionP (const QWeakPointer< SphericalRegion > &other) | |
Static Public Member Functions | |
static SphericalRegionP | loadFromJson (QIODevice *in) |
static SphericalRegionP | loadFromJson (const QByteArray &a) |
static SphericalRegionP | loadFromQVariant (const QVariantMap &map) |
static SphericalRegionP | loadFromQVariant (const QVariantList &list) |
Static Public Attributes | |
static const QVariant::Type | qVariantType |
static int | metaTypeId |
static SphericalRegionP SphericalRegionP::loadFromJson | ( | QIODevice * | in | ) | [static] |
Create a SphericalRegion from the given input JSON stream.
The type of the region is automatically recognized from the input format. The currently recognized format are:
[[contour1], [contour2],[...]]
[[ra,dec], [ra,dec], [ra,dec], [ra,dec]]
["CAP", [raCenter,decCenter], ap]
["CAP", [0.,-90.], 90]
["PATH", [startRa,startDec], [[prim1],[prim2],[prim3],...]]
["PATH",[330,-25],[["smallCircle",[0,90],82.5],["greatCircleTo",[52.5,-35]],["smallCircle",[0,90],-82.5]]]
{ "worldCoords": [[[ra,dec],[ra,dec],[ra,dec],[ra,dec]], [[ra,dec],[ra,dec],[ra,dec]],[...]], "textureCoords": [[[u,v],[u,v],[u,v],[u,v]], [[u,v],[u,v],[u,v]], [...]] }
in | an open QIODevice ready for read. |
std::runtime_error | when there was an error while parsing the file. |
static SphericalRegionP SphericalRegionP::loadFromJson | ( | const QByteArray & | a | ) | [static] |
Create a SphericalRegion from the given QByteArray containing the JSON data.
static SphericalRegionP SphericalRegionP::loadFromQVariant | ( | const QVariantMap & | map | ) | [static] |
Create a SphericalRegion from the given QVariantMap with a format matching the JSON file parsed in loadFromJson().
map | a valid QVariantMap which can be created e.g. from parsing a JSON file with the StelJsonParser class. |
const QVariant::Type SphericalRegionP::qVariantType [static] |
The QVariant type associated to a SphericalRegionP.
int SphericalRegionP::metaTypeId [static] |
The meta type ID associated to a SphericalRegionP.