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>

Inherits SphericalConvexPolygon.

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 QVariantMap 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 (  )  [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::setContour ( const QVector< Vec3d > &  acontour,
const QVector< Vec2f > &  texCoord 
) [inline, virtual]

Set a single contour defining the SphericalPolygon.

acontour a contour defining the polygon area.
texCoord a list of texture coordinates matching the vertices of the contour.

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

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

The format is:

 {"type": "CVXPOLYGON", "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.

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.

Member Data Documentation

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

There should be 1 uv position per vertex.

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