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

SphericalTexturedConvexPolygon Class Reference

Extension of SphericalConvexPolygon for textured polygon. More...

#include <StelSphereGeometry.hpp>

List of all members.

Public Member Functions

 SphericalTexturedConvexPolygon ()
 Default constructor.
 SphericalTexturedConvexPolygon (const QVector< Vec3d > &contour, const QVector< Vec2f > &texCoord)
 Constructor from one contour.
 SphericalTexturedConvexPolygon (const Vec3d &e0, const Vec3d &e1, const Vec3d &e2, const Vec3d &e3)
 Special constructor for quads.
virtual StelVertexArray getFillVertexArray () const
 Return an openGL compatible array to be displayed using vertex arrays.
virtual void setContour (const QVector< Vec3d > &acontour, const QVector< Vec2f > &texCoord)
 Set a single contour defining the SphericalPolygon.
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().

Protected Attributes

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

Detailed Description

Extension of SphericalConvexPolygon for textured polygon.


Constructor & Destructor Documentation

SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon (  )  [inline]

Default constructor.

SphericalTexturedConvexPolygon::SphericalTexturedConvexPolygon ( const QVector< Vec3d > &  contour,
const QVector< Vec2f > &  texCoord 
) [inline]

Constructor from one contour.

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::serialize ( QDataStream &  out  )  const [inline, virtual]

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

Reimplemented from SphericalConvexPolygon.

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

Set a single contour defining the SphericalPolygon.

Parameters:
acontour a contour defining the polygon area.
texCoord a 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.

Generated on Sat Aug 25 22:13:32 2012 for Stellarium by  doxygen 1.6.3