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

SphericalTexturedPolygon Class Reference

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

#include <StelSphereGeometry.hpp>

Inherits SphericalPolygon.

List of all members.

Public Member Functions

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


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

Detailed Description

An extension of SphericalPolygon with addition of texture coordinates.

Constructor & Destructor Documentation

SphericalTexturedPolygon::SphericalTexturedPolygon ( const QVector< QVector< TextureVertex > > &  contours  )  [inline]

Constructor from a list of contours.

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

Constructor from one contour.

Member Function Documentation

virtual StelVertexArray SphericalTexturedPolygon::getFillVertexArray (  )  const [inline, virtual]

Return an openGL compatible array of texture coords to be used using vertex arrays.

Reimplemented from SphericalRegion.

virtual QVariantMap SphericalTexturedPolygon::toQVariant (  )  const [virtual]

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

The format is:

 {"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]], [...]]
textureCoords is a list of texture coordinates in the u,v texture space (between 0 and 1). worldCoords is a list of closed contours, with each points defined by ra dec in degree in the ICRS frame. There must be one texture coordinate for each vertex.

Implements SphericalRegion.

virtual void SphericalTexturedPolygon::serialize ( QDataStream &  out  )  const [inline, virtual]

Serialize the region. This method must allow as fast as possible serialization and work with deserialize().

Implements SphericalRegion.

void SphericalTexturedPolygon::setContours ( const QVector< QVector< TextureVertex > > &  contours  )  [inline]

Set the contours defining the SphericalPolygon.

contours the list of contours defining the polygon area using the WindingPositive winding rule.

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

Set a single contour defining the SphericalPolygon.

contour a contour defining the polygon area.

Generated on Wed Jun 2 13:11:14 2010 for Stellarium by  doxygen 1.5.5