Stellarium 0.11.2
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure
Classes | Public Member Functions
SphericalTexturedPolygon Class Reference

An extension of SphericalPolygon with addition of texture coordinates. More...

#include <StelSphereGeometry.hpp>

List of all members.


struct  TextureVertex
 A container for 3D vertex + associated texture coordinates. More...

Public Member Functions

 SphericalTexturedPolygon (const QVector< QVector< TextureVertex > > &contours)
 SphericalTexturedPolygon (const QVector< TextureVertex > &contour)
virtual StelVertexArray getFillVertexArray () const
virtual QVariantList toQVariant () const
virtual void serialize (QDataStream &out) const
void setContours (const QVector< QVector< TextureVertex > > &contours)
void setContour (const QVector< TextureVertex > &contour)

Detailed Description

An extension of SphericalPolygon with addition of texture coordinates.

Member Function Documentation

void SphericalTexturedPolygon::setContour ( const QVector< TextureVertex > &  contour) [inline]

Set a single contour defining the SphericalPolygon.

contoura contour defining the polygon area.
void SphericalTexturedPolygon::setContours ( const QVector< QVector< TextureVertex > > &  contours) [inline]

Set the contours defining the SphericalPolygon.

contoursthe list of contours defining the polygon area using the WindingPositive winding rule.
virtual QVariantList SphericalTexturedPolygon::toQVariant ( ) const [virtual]

Serialize the region into a QVariant map matching the JSON format.

The format is:

 ["TEXTURED_POLYGON", [[[ra,dec], [ra,dec], [ra,dec], [ra,dec]], [[ra,dec], [ra,dec], [ra,dec]],[...]],
 [[[u,v],[u,v],[u,v],[u,v]], [[u,v],[u,v],[u,v]], [...]]]

where the two lists are a list of closed contours, with each points defined by ra dec in degree in the ICRS frame followed by a list of texture coordinates in the u,v texture space (between 0 and 1). There must be one texture coordinate for each vertex.

Reimplemented from SphericalPolygon.