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

Extension of SphericalConvexPolygon for textured polygon. More...

#include <StelSphereGeometry.hpp>

List of all members.

Public Member Functions

 SphericalTexturedConvexPolygon ()
 SphericalTexturedConvexPolygon (const QVector< Vec3d > &contour, const QVector< Vec2f > &texCoord)
 SphericalTexturedConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2, const Vec3d &e3)
virtual StelVertexArray getFillVertexArray () const
virtual void setContour (const QVector< Vec3d > &acontour, const QVector< Vec2f > &texCoord)
virtual QVariantList toQVariant () const
virtual void serialize (QDataStream &out) const

Protected Attributes

QVector< Vec2ftextureCoords

Detailed Description

Extension of SphericalConvexPolygon for textured polygon.

Constructor & Destructor Documentation

SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon ( const Vec3d e0,
const Vec3d e1,
const Vec3d e2,
const Vec3d e3 
) [inline]

Special constructor for quads.

Use the 4 textures corners for the 4 vertices.

Member Function Documentation

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

Return an openGL compatible array to be displayed using vertex arrays.

This method is not optimized for SphericalConvexPolygon instances.

Reimplemented from SphericalConvexPolygon.

virtual void SphericalTexturedConvexPolygon::setContour ( const QVector< Vec3d > &  acontour,
const QVector< Vec2f > &  texCoord 
) [inline, virtual]

Set a single contour defining the SphericalPolygon.

acontoura contour defining the polygon area.
texCoorda list of texture coordinates matching the vertices of the contour.
virtual QVariantList SphericalTexturedConvexPolygon::toQVariant ( ) const [virtual]

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

The format is:

 ["TEXTURED_CONVEX_POLYGON", [[ra,dec], [ra,dec], [ra,dec], [ra,dec]], [[u,v],[u,v],[u,v],[u,v]]]

where the two lists are a closed convex 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 SphericalConvexPolygon.

Member Data Documentation

A list of uv textures coordinates corresponding to the triangle vertices.

There should be 1 uv position per vertex.